Merge branch 'main' of github.com:MM2-0/Kvaesitso

This commit is contained in:
MM20
2026-08-21 16:14:38 +02:00
3 changed files with 167 additions and 79 deletions

View File

@@ -115,7 +115,7 @@
<string name="widget_config_calendar_missing_calendars_hint">หาปฏิทินไม่เจอหรือ\?</string>
<string name="missing_permission_calendar_widget">คุณต้องอนุญาตให้แอปเข้าถึงปฏิทินเพื่อแสดงนัดหมายและกิจกรรมที่นี่</string>
<string name="missing_permission_contact_search">คุณต้องอนุญาตให้แอปเข้าถึงรายชื่อผู้ติดต่อเพื่อค้นหาในรายชื่อผู้ติดต่อ</string>
<string name="missing_permission_appshortcuts_search">กำหนดให้แอป %1$s เป็นตัวใช้งานเริ่มต้นเพื่อค้นหาทางลัดแอป</string>
<string name="missing_permission_appshortcuts_search">กำหนดให้แอป %1$s เป็นลอนเชอร์เริ่มต้นเพื่อค้นหาทางลัดแอป</string>
<string name="grant_permission">อนุญาต</string>
<string name="preference_screen_appearance">ลักษณะ</string>
<string name="preference_theme_dark">มืด</string>
@@ -215,7 +215,7 @@
<string name="preference_screen_search">ค้นหา</string>
<string name="preference_logs">ไฟล์เก็บข้อมูลกิจกรรมแอป</string>
<string name="preference_search_favorites">รายการโปรด</string>
<string name="preference_screen_search_summary">การค้นหา แท็ก สิ่งที่ถูกซ่อน</string>
<string name="preference_screen_search_summary">การค้นหา แท็ก ผลการค้นหาที่ถูกตัดออก</string>
<string name="preference_search_files">ไฟล์</string>
<string name="preference_search_calendar">ปฏิทิน</string>
<string name="preference_search_appshortcuts">ทางลัดแอป</string>
@@ -236,9 +236,9 @@
<string name="preference_search_bar_color">สี</string>
<string name="preference_search_bar_auto_focus">เปิดคีย์บอร์ด</string>
<string name="preference_search_bar_launch_on_enter">เปิดแอปเมื่อกด Enter</string>
<string name="preference_hidden_items">ซ่อนผลการค้นหา</string>
<string name="preference_hidden_items_summary">จัดการแอปและผลการค้นหาที่ถูกซ่อน</string>
<string name="preference_hidden_items_reveal_button_summary">แสดงปุ่มที่เปิดเผยผลการค้นหาที่ซ่อนไว้</string>
<string name="preference_hidden_items">ผลการค้นหาที่ถูกตัดออก</string>
<string name="preference_hidden_items_summary">จัดการแอปและผลการค้นหาที่ถูกตัดออก</string>
<string name="preference_hidden_items_reveal_button_summary">แสดงปุ่มเผยผลการค้นหาที่ถูกตัดออก</string>
<string name="preference_screen_tags">แท็ก</string>
<string name="preference_screen_tags_summary">จัดการแท็ก และสิ่งที่ถูกแท็ก</string>
<string name="preference_wikipedia_customurl">ลิงก์วิกิพีเดีย</string>
@@ -261,7 +261,7 @@
<string name="apps_profile_work">งาน</string>
<string name="favorites_empty_tag">ไม่มีสิ่งที่มีแท็กนี้</string>
<string name="frequently_used_rows">จำนวนแถว</string>
<string name="preference_screen_search_actions">ควิกแอกชั</string>
<string name="preference_screen_search_actions">ควิกแอกชัน</string>
<string name="search_action_call">โทร</string>
<string name="search_action_message">ส่งข้อความ</string>
<string name="search_action_email">ส่งอีเมล</string>
@@ -294,10 +294,10 @@
<string name="preference_gesture_double_tap">แตะสองครั้งติดกัน</string>
<string name="preference_gesture_home_button">ปุ่มหน้าแรก/ท่าทางการสัมผัส</string>
<string name="gesture_action_none">ไม่ต้องทำอะไร</string>
<string name="gesture_action_open_search">เปิดการค้นหา</string>
<string name="gesture_action_open_search">การค้นหา / ลิ้นชักรวมแอป</string>
<string name="gesture_action_lock_screen">ปิดหน้าจอ</string>
<string name="gesture_action_power_menu">แสดงเมนูเปิดปิดเครื่อง</string>
<string name="gesture_action_recents">เปิดแอปที่เพิ่งถูกใช้</string>
<string name="gesture_action_power_menu">เมนูเปิดปิดเครื่อง</string>
<string name="gesture_action_recents">แอปที่เปิดล่าสุด</string>
<string name="preference_search_result_ordering_weight_factor_low">เปลี่ยนช้า</string>
<string name="preference_search_result_ordering_weight_factor_default">เปลี่ยนปานกลาง</string>
<string name="preference_search_result_ordering_weight_factor_high">เปลี่ยนเร็ว</string>
@@ -360,17 +360,17 @@
<string name="default_websearch_2_url">https://www.youtube.com/results\?search_query=${1}</string>
<string name="file_type_launcherbackup">ข้อมูลสำรอง %1$s</string>
<string name="default_websearch_3_name">Google Play</string>
<string name="preference_debug_cleanup_database_summary">ลบรายการที่เสียและไม่จำเป็นออกจากฐานข้อมูลของแอปหน้าแรก</string>
<string name="preference_debug_cleanup_database_summary">ลบรายการที่เสียและไม่จำเป็นออกจากฐานข้อมูลของลอนเชอร์</string>
<string name="default_websearch_3_url">https://play.google.com/store/search\?q=${1}</string>
<string name="preference_screen_backup_summary">ส่งออกและนำเข้าข้อมูลแอปหน้าแรก</string>
<string name="preference_backup_summary">ส่งออกการตั้งค่าและข้อมูลแอปหน้าแรก</string>
<string name="missing_permission_accessibility_gesture_failed">จำเป็นต้องเปิดใช้งานสิทธิ์การเข้าถึงของแอปหน้าแรกจึงจะสามารถดำเนินการนี้ได้</string>
<string name="preference_screen_backup_summary">ส่งออกและนำเข้าข้อมูลลอนเชอร์</string>
<string name="preference_backup_summary">ส่งออกการตั้งค่าและข้อมูลลอนเชอร์</string>
<string name="missing_permission_accessibility_gesture_failed">จำเป็นต้องเปิดใช้งานสิทธิ์การเข้าถึงของลอนเชอร์จึงจะสามารถดำเนินการนี้ได้</string>
<string name="websearch_dialog_query_encoding_url">เข้ารหัสแบบเปอร์เซ็นต์</string>
<string name="missing_permission_accessibility_gesture_settings">การดำเนินการนี้ต้องการสิทธิ์การเข้าถึงของแอปหน้าแรก</string>
<string name="missing_permission_accessibility_gesture_settings">การดำเนินการนี้ต้องการสิทธิ์การเข้าถึงของลอนเชอร์</string>
<string name="websearch_dialog_query_encoding_form">application/x-www-form-urlencoded</string>
<string name="menu_edit_widgets">แก้ไขวิดเจ็ต</string>
<string name="note_widget_file_read_error_description">ไม่สามารถอ่านไฟล์โน้ตต้นฉบับได้ ข้อมูลสำเนาถูกกู้คืนมาจากพื้นที่จัดเก็บภายในของแอปหน้าแรก ถ้าคุณแก้ไขโน้ต ไฟล์โน้ตต้นฉบับอาจโดนเขียนทับ</string>
<string name="note_widget_file_write_error_description">ไม่สามารถเขียนโน้ตไปยังไฟล์ต้นฉบับได้ บันทึกข้อมูลสำเนาไปยังพื้นที่จัดเก็บภายในของแอปหน้าแรกแล้ว</string>
<string name="note_widget_file_read_error_description">ไม่สามารถอ่านไฟล์โน้ตต้นฉบับได้ ข้อมูลสำเนาถูกกู้คืนมาจากพื้นที่จัดเก็บภายในของลอนเชอร์ ถ้าคุณแก้ไขโน้ต ไฟล์โน้ตต้นฉบับอาจโดนเขียนทับ</string>
<string name="note_widget_file_write_error_description">ไม่สามารถเขียนโน้ตไปยังไฟล์ต้นฉบับได้ บันทึกข้อมูลสำเนาไปยังพื้นที่จัดเก็บภายในของลอนเชอร์แล้ว</string>
<string name="menu_share_store_link">ลิงก์ %1$s</string>
<string name="widget_add_widget">เพิ่มวิดเจ็ต</string>
<string name="menu_favorites_pin">ปักหมุดไปยังรายการโปรด</string>
@@ -456,7 +456,7 @@
<string name="missing_permission_contact_search_settings">คุณต้องอนุญาตให้แอปเข้าถึงรายชื่อผู้ติดต่อเพื่อค้นหาผู้ติดต่อ</string>
<string name="preference_logs_summary">ดูและส่งออกไฟล์เก็บข้อมูลกิจกรรมแอป</string>
<string name="missing_permission_calendar_search_settings">คุณต้องอนุญาตให้แอปเข้าถึงปฏิทินเพื่อค้นหาปฏิทิน</string>
<string name="missing_permission_appshortcuts_search_settings">คุณต้องกำหนดให้แอป %1$s เป็นตัวใช้งานเริ่มต้นจึงจะค้นหาทางลัดแอปได้</string>
<string name="missing_permission_appshortcuts_search_settings">คุณต้องกำหนดให้แอป %1$s เป็นลอนเชอร์เริ่มต้นจึงจะค้นหาทางลัดแอปได้</string>
<string name="preference_search_favorites_summary">แสดงสิ่งที่ถูกปักหมุดและสิ่งที่ถูกใช้งานบ่อยข้างบนลิ้นชักแอป</string>
<string name="preference_widgets_edit_button_summary">แสดงปุ่มสำหรับการเพิ่ม ลบ และจัดเรียงวิดเจ็ต</string>
<string name="missing_permission_file_search_settings">คุณต้องอนุญาตให้แอปเข้าถึงพื้นที่จัดเก็บข้อมูลภายนอกเพื่อค้นหาไฟล์บนอุปกรณ์นี้</string>
@@ -473,7 +473,7 @@
<string name="preference_weather_integration">สภาพอากาศ</string>
<string name="missing_permission_files_search">คุณต้องอนุญาตให้แอปเข้าถึงพื้นที่จัดเก็บข้อมูลเพื่อค้นหาไฟล์บนอุปกรณ์นี้</string>
<string name="preference_search_calculator_summary">คำนวณและดำเนินการทางคณิตศาสตร์</string>
<string name="missing_permission_appshortcuts_create">กำหนดให้แอป %1$s เป็นตัวใช้งานเริ่มต้นเพื่อสร้างทางลัด</string>
<string name="missing_permission_appshortcuts_create">กำหนดให้แอป %1$s เป็นลอนเชอร์เริ่มต้นเพื่อสร้างทางลัด</string>
<string name="preference_search_currencyconverter_summary">ดาวน์โหลดอัตราแรกเปลี่ยนเพื่อแปลงสกุลเงินเป็นระยะๆ</string>
<string name="preference_search_websites_summary">แสดงตัวอย่างของเว็บไซต์ถ้าคำค้นหาเป็นลิงก์</string>
<string name="preference_media_integration">ตัวควบคุมสื่อ</string>
@@ -490,12 +490,12 @@
<string name="restore_incompatible_file">ข้อมูลสำรองนี้ถูกสร้างโดย %1$s คนละเวอร์ชั่น จึงไม่สามารถกู้คืนด้วยเวอร์ชั่นปัจจุบันได้</string>
<string name="preference_search_bar_auto_focus_summary">แสดงคีย์บอร์ดอัตโนมัติเมื่อเปิดลิ้นชักรวมแอป</string>
<string name="restore_different_minor_version">ข้อมูลสำรองนี้ถูกสร้างโดย %1$s คนละเวอร์ชั่น ข้อมูลบางส่วนอาจไม่ถูกกู้คืนอย่างถูกต้อง</string>
<string name="preference_search_bar_launch_on_enter_summary">เปิดสิ่งที่ถูกไฮไลต์หรือควิกแอกชันเมื่อแตะ \"ไป\"</string>
<string name="preference_search_bar_launch_on_enter_summary">เปิดสิ่งที่ถูกไฮไลต์หรือควิกแอกชันเมื่อแตะ \"ไป\"</string>
<string name="favorites">รายการโปรด</string>
<string name="preference_hidden_items_reveal_button">แสดงปุ่มเลิกซ่อน</string>
<string name="favorites_empty">สิ่งที่ถูกปักหมุดไว้และสิ่งที่ถูกใช้บ่อยจะถูกแสดงที่นี่</string>
<string name="frequently_used_show_in_favorites">แสดงในรายการโปรด</string>
<string name="preference_search_search_actions_summary">ปรับแต่งควิกแอกชั</string>
<string name="preference_search_search_actions_summary">ปรับแต่งควิกแอกชัน</string>
<string name="search_action_alarm">ตั้งปลุก</string>
<string name="search_action_timer">เริ่มจับเวลา</string>
<string name="search_action_event">เขียนกำหนดการกิจกรรม</string>
@@ -518,8 +518,8 @@
<string name="preference_gesture_swipe_right">ปัดขวา</string>
<string name="preference_gesture_long_press">แตะค้าง</string>
<string name="gesture_action_launch_app">เปิดแอป</string>
<string name="gesture_action_notifications">เปิดแผงการแจ้งเตือน</string>
<string name="gesture_action_quick_settings">เปิดการตั้งค่าลัด</string>
<string name="gesture_action_notifications">การแจ้งเตือน</string>
<string name="gesture_action_quick_settings">การตั้งค่าลัด</string>
<string name="gesture_failed_message">คุณได้ทำท่าทางการสัมผัสแบบ \"%1$s\" ซึ่งถูกกำหนดไว้ว่าให้ทำ \"%2$s\" แต่ไม่สามารถดำเนินการได้เพราะเหตุผลต่อไปนี้:</string>
<string name="preference_search_result_ordering_weight_factor">ความเร็วในการเปลี่ยนแปลงลำดับ</string>
<string name="widget_config_appwidget_background">การ์ดพื้นหลัง</string>
@@ -530,7 +530,7 @@
<string name="note_widget_action_relink_file">ลิงก์ใหม่</string>
<string name="note_widget_conflict">มีความขัดแย้งของข้อมูล</string>
<string name="note_widget_conflict_description">ไฟล์ที่ถูกลิงก์มีข้อมูลอยู่แต่เนื้อหาของไฟล์ไม่ตรงกับเวอร์ชั่นล่าสุดที่ถูกบันทึกในโน้ตนี้ คุณต้องการเก็บเวอร์ชั่นใดไว้\?</string>
<string name="confirmation_delete_color_scheme">คุณต้องการลบชุดสี %1$s ใช่หรือไม่?</string>
<string name="confirmation_delete_color_scheme">คุณต้องการลบโทนสี %1$s ใช่หรือไม่?</string>
<string name="file_type_launchertheme">ธีม %1$s</string>
<string name="import_theme_error">ไม่สามารถอ่านไฟล์ที่เลือกไว้ได้ กรุณาตรวจสอบว่าคุณได้เลือกไฟล์ธีมที่ถูกต้อง (*.kvtheme) และข้อมูลไฟล์ไม่เสียหาย</string>
<string name="preference_blur_wallpaper_radius">ความมัว</string>
@@ -541,7 +541,7 @@
<string name="shortcut_label_unavailable">เข้าถึงไม่ได้</string>
<string name="preference_clock_widget_alignment">การจัดตำแหน่ง</string>
<string name="preference_clock_widget_alignment_bottom">ด้านล่าง</string>
<string name="shortcut_unavailable_description">ไม่สามารถเข้าถึงทางลัดนี้ได้ เนื่องจาก %1$s ไม่ได้ถูกตั้งเป็นแอปหน้าแรกริ่มต้น</string>
<string name="shortcut_unavailable_description">ไม่สามารถเข้าถึงทางลัดนี้ได้ เนื่องจาก %1$s ไม่ได้ถูกตั้งเป็นลอนเชอร์เริ่มต้น</string>
<string name="preference_clockwidget_dynamic_zone">ส่วนไดนามิก</string>
<string name="preference_screen_plugins">ปลั๊กอิน</string>
<string name="preference_screen_plugins_summary">จัดการส่วนเสริมที่ติดตั้งไว้</string>
@@ -587,7 +587,7 @@
<string name="preference_search_locations_radius">ขอบเขตการค้นหา</string>
<string name="preference_search_locations_summary">ค้นหาร้านค้าและสถานที่อื่นๆในพื้นที่ใกล้เคียง</string>
<string name="preference_search_locations_show_map">แผนที่</string>
<string name="preference_search_locations_theme_map_summary">ปรับสีของแผนที่ตามโทนสีของแอปหน้าแรก</string>
<string name="preference_search_locations_theme_map_summary">ปรับสีของแผนที่ตามโทนสีของลอนเชอร์</string>
<string name="plugin_state_setup_required">คุณต้องตั้งค่าปลั๊กอินนี้ก่อน</string>
<string name="weather_condition_thunderstorm">พายุฝนฟ้าคะนอง</string>
<string name="preference_search_locations">สถานที่</string>
@@ -833,12 +833,12 @@
<string name="new_theme_name">(ไม่มีชื่อ)</string>
<string name="preference_screen_transparencies">ความโปร่งใส</string>
<string name="confirmation_delete_transparencies_scheme">คุณต้องการลบชุดความโปร่งใส %1$s ใช่หรือไม่?</string>
<string name="preference_screen_typography">การจัดตัวอักษร</string>
<string name="confirmation_delete_typography_scheme">คุณต้องการลบชุดการจัดตัวอักษร %1$s ใช่หรือไม่?</string>
<string name="preference_typography_fonts">ชุดแบบอักษร</string>
<string name="preference_screen_typography">ฟอนต์</string>
<string name="confirmation_delete_typography_scheme">คุณต้องการลบชุดฟอนต์ %1$s ใช่หรือไม่?</string>
<string name="preference_typography_fonts">รูปแบบฟอนต์</string>
<string name="font_category_device_default">ค่าเริ่มต้นของอุปกรณ์</string>
<string name="font_name_device_body">ชุดแบบอักษรของอุปกรณ์</string>
<string name="font_name_device_headline">ชุดแบบอักษรเริ่มต้นสำหรับหัวเรื่อง</string>
<string name="font_name_device_headline">ฟอนต์เริ่มต้นสำหรับหัวเรื่อง</string>
<string name="font_category_generic">ทั่วไป</string>
<string name="preference_search_bar_style_transparent">โปร่งใส</string>
<string name="preference_search_bar_style_solid">สีทึบ</string>
@@ -850,4 +850,79 @@
<string name="poi_category_hackerspace">แฮกเกอร์สเปซ</string>
<string name="poi_category_stationery">ร้านขายเครื่องเขียน</string>
<string name="preference_clockwidget_dock_rows">แถวในด็อค</string>
<string name="action_quit">ออก</string>
<string name="uv_index">ยูวี %1$d</string>
<string name="widget_name_apps">แอป</string>
<string name="preference_create_colors">โทนสีใหม่</string>
<string name="preference_create_shapes">ชุดรูปร่าง</string>
<string name="preference_create_typography">ชุดฟอนต์ใหม่</string>
<string name="preference_create_transparency">ชุดความโปร่งใสใหม่</string>
<string name="preference_category_enabled_plugins">เปิดใช้งานแล้ว</string>
<string name="preference_category_installed_plugins">ติดตั้งแล้ว</string>
<string name="preference_clockwidget_smartspacer">จัดการโดย Smartspacer</string>
<string name="preference_clockwidget_battery_part_always_show">แสดงไว้เสมอ</string>
<string name="preference_clockwidget_battery_part_show">แสดงเมื่อเหลือน้อยหรือกำลังชาร์จอยู่</string>
<string name="preference_clockwidget_battery_part_hide">ไม่แสดง</string>
<string name="preference_search_apps">แอป</string>
<string name="preference_search_apps_summary">แสดงแอปทั้งหมดเมื่อยังไม่ได้พิมพ์สิ่งใดในแถบการค้นหา</string>
<string name="preference_search_apps_show_details">แสดงข้อมูลแอป</string>
<string name="preference_search_apps_show_details_summary">แสดงเวอร์ชันและชื่อแพ็กเกจของแอปในเมนูกดค้าง</string>
<string name="preference_currency_settings">การตั้งค่าสกุลเงิน</string>
<string name="preference_smartspacer_integration">Smartspacer</string>
<string name="preference_smartspacer_integration_description">Smartspacer คือแอปเสรีและโอเพนซอร์สสำหรับวิดเจ็ตข้อมูลโดยย่อ (At a Glance) คุณสามารถติดตั้งแอป Smartspacer เพื่อนำไปใช้ในโซนไดนามิกของวิดเจ็ตนาฬิกาได้</string>
<string name="preference_smartspacer_enable">เปิดใช้งานการเชื่อมต่อกับ Smartspacer</string>
<string name="preference_launch_smartspacer_app">เปิด Smartspacer</string>
<string name="preference_feed_integration">ฟีด</string>
<string name="preference_category_feed_provider">ผู้ให้บริการฟีด</string>
<string name="preference_feed_enable_summary">ปัดไปทางขวาบนหน้าจอหลักเพื่อเปิดฟีด</string>
<string name="no_feed_providers">ยังไม่ไ่ด้ติดตั้งผู้ให้บริการฟีดใด</string>
<string name="search_query_private_space">พื้นที่ส่วนตัว</string>
<string name="search_action_private_space_lock">ล็อกพื้นที่ส่วนตัว</string>
<string name="search_action_private_space_unlock">ปลดล็อกพื้นที่ส่วนตัว</string>
<string name="create_search_action_title">ควิกแอกชันใหม่</string>
<string name="edit_search_action_title">แก้ไขควิกแอกชัน</string>
<string name="tag_name_empty_error">เว้นชื่อว่างไว้ไม่ได้</string>
<string name="tag_icon_customicon">ไอคอน</string>
<string name="tag_icon_emoji">อีโมจิ</string>
<string name="gesture_action_category_launcher">หน้าต่างๆของลอนเชอร์</string>
<string name="gesture_action_category_system">แอกชันระบบ</string>
<string name="gesture_action_category_apps">ทางลัดและแอปต่างๆ</string>
<string name="gesture_action_widgets_new">หน้าวิดเจ็ตใหม่</string>
<string name="gesture_action_widgets_empty">ว่าง</string>
<string name="gesture_action_widgets_indexed">วิดเจ็ต (%1$d)</string>
<string name="gesture_action_launch_select_app">เลือกแอปหรือทางลัด</string>
<string name="gesture_action_feed">ฟีด</string>
<string name="add_font_style">เพิ่มรูปแบบฟอนต์</string>
<string name="remove_font_style">ลบรูปแบบฟอนต์นี้</string>
<string name="preference_screen_locale">ภาษาและภูมิภาค</string>
<string name="preference_screen_locale_summary">ภาษา หน่วยวัด และรูปแบบเวลา</string>
<string name="preference_language">ภาษา</string>
<string name="preference_value_system_default">ค่าเริ่มต้นของระบบ</string>
<string name="preference_value_disabled">ปิดใช้งาน</string>
<string name="preference_form_of_address">การพูดถึงตัวคุณ</string>
<string name="preference_form_of_address_neutral">กลางๆ</string>
<string name="preference_form_of_address_fem">เพศหญิง</string>
<string name="preference_form_of_address_masc">เพศชาย</string>
<string name="preference_measurement_system">ระบบการวัด</string>
<string name="preference_measurement_system_metric">เมตริก</string>
<string name="preference_measurement_system_uk">สหราชอาณาจักร</string>
<string name="preference_measurement_system_us">สหรัฐอเมริกา</string>
<string name="preference_transliteration">การทับศัพท์ที่ต้องการใช้</string>
<string name="preference_transliteration_auto">อัตโนมัติ</string>
<string name="preference_calendar_system">ระบบปฏิทิน</string>
<string name="preference_calendar_system_primary">ปฏิทินหลัก</string>
<string name="preference_calendar_system_secondary">ปฏิทินรอง</string>
<string name="preference_currencies">สกุลเงิน</string>
<string name="preference_add_currency">เพิ่มสกุลเงิน</string>
<string name="select_tag">เลือกแท็ก</string>
<string name="create_tag_title">แท็กใหม่</string>
<string name="edit_tag_title">แก้ไขแท็ก</string>
<string name="dialog_discard_unsaved">ออกโดยไม่บันทึกใช่หรือไม่</string>
<string name="typo_preview_extra_short">กข</string>
<string name="typo_preview_short1">สยาม</string>
<string name="typo_preview_short2">ไทย</string>
<string name="typo_preview_medium1">กรุงเทพฯ</string>
<string name="typo_preview_medium2">ถนนจตุรทิศ</string>
<string name="typo_preview_long">นายสมศักดิ์ ภูมิใจ\nหมายเลขบัตร 124790</string>
<string name="preference_category_donate">สนับสนุนการพัฒนา</string>
</resources>

View File

@@ -23,6 +23,8 @@ import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.currentCoroutineContext
import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
@@ -115,62 +117,34 @@ internal class AppShortcutRepositoryImpl(
return flags
}
private class NormalizedShortcut(
val info: ShortcutInfo,
val normalizedLabels: List<String>,
)
override fun search(query: String, allowNetwork: Boolean): Flow<ImmutableList<AppShortcut>> {
if (query.length < 3) {
return flowOf(persistentListOf())
}
val normalizedQuery = stringNormalizer.normalize(query)
return rawShortcuts.map { shortcuts ->
val filtered = shortcuts.mapIndexedNotNull { index, normalized ->
if (index % 8 == 0) currentCoroutineContext().ensureActive()
return combine(
listOf(
settings.enabled,
permissionsManager.hasPermission(PermissionGroup.AppShortcuts),
shortcutChangeEmitter
)
) { it }
.map { (enabled, perm, _) ->
enabled as Boolean
perm as Boolean
if (enabled && perm) {
val launcherApps =
context.getSystemService<LauncherApps>() ?: return@map persistentListOf()
val shortcutQuery = LauncherApps.ShortcutQuery()
shortcutQuery.setQueryFlags(
LauncherApps.ShortcutQuery.FLAG_MATCH_PINNED or
LauncherApps.ShortcutQuery.FLAG_MATCH_DYNAMIC or
LauncherApps.ShortcutQuery.FLAG_MATCH_MANIFEST or
LauncherApps.ShortcutQuery.FLAG_MATCH_CACHED or
LauncherApps.ShortcutQuery.FLAG_MATCH_PINNED_BY_ANY_LAUNCHER
)
val shortcuts = launcherApps.getShortcuts(shortcutQuery, Process.myUserHandle())
?.mapNotNull {
val score = ResultScore.from(
query = normalizedQuery,
primaryFields = listOfNotNull(
it.longLabel?.toString()
?.let { stringNormalizer.normalize(it) },
it.shortLabel?.toString()
?.let { stringNormalizer.normalize(it) },
)
)
if (score.score < 0.8f) return@mapNotNull null
LauncherShortcut(
context,
it,
score
)
} ?: emptyList()
shortcuts.toImmutableList()
} else {
persistentListOf()
}
}.flowOn(Dispatchers.Default)
val score = ResultScore.from(
query = normalizedQuery,
primaryFields = normalized.normalizedLabels,
)
if (score.score < 0.8f) return@mapIndexedNotNull null
LauncherShortcut(
context,
normalized.info,
score
)
}.toImmutableList()
filtered
}.flowOn(Dispatchers.Default)
}
private val shortcutChangeEmitter = callbackFlow {
@@ -219,6 +193,45 @@ internal class AppShortcutRepositoryImpl(
}
}.shareIn(scope, SharingStarted.WhileSubscribed(500), 1)
private val rawShortcuts: Flow<List<NormalizedShortcut>> = combine(
listOf(
settings.enabled,
permissionsManager.hasPermission(PermissionGroup.AppShortcuts),
shortcutChangeEmitter
)
) { it }
.map { (enabled, perm, _) ->
enabled as Boolean
perm as Boolean
if (!enabled || !perm) return@map emptyList()
val launcherApps =
context.getSystemService<LauncherApps>() ?: return@map emptyList()
val shortcutQuery = LauncherApps.ShortcutQuery()
shortcutQuery.setQueryFlags(
LauncherApps.ShortcutQuery.FLAG_MATCH_PINNED or
LauncherApps.ShortcutQuery.FLAG_MATCH_DYNAMIC or
LauncherApps.ShortcutQuery.FLAG_MATCH_MANIFEST or
LauncherApps.ShortcutQuery.FLAG_MATCH_CACHED or
LauncherApps.ShortcutQuery.FLAG_MATCH_PINNED_BY_ANY_LAUNCHER
)
val result = launcherApps.getShortcuts(shortcutQuery, Process.myUserHandle()) ?: emptyList()
val normalized = result.map {
NormalizedShortcut(
info = it,
normalizedLabels = listOfNotNull(
it.longLabel?.toString()?.let { l -> stringNormalizer.normalize(l) },
it.shortLabel?.toString()?.let { l -> stringNormalizer.normalize(l) },
)
)
}
normalized
}
.flowOn(Dispatchers.Default)
.shareIn(scope, SharingStarted.Eagerly, replay = 1)
override suspend fun getShortcutsConfigActivities(): List<AppShortcutConfigActivity> {
val launcherApps = context.getSystemService(Context.LAUNCHER_APPS_SERVICE) as LauncherApps
if (!launcherApps.hasShortcutHostPermission()) return emptyList()

View File

@@ -8,7 +8,7 @@ import org.koin.core.qualifier.named
import org.koin.dsl.module
val appShortcutsModule = module {
factory<AppShortcutRepository> { AppShortcutRepositoryImpl(androidContext(), get(), get(), get(), get()) }
single<AppShortcutRepository> { AppShortcutRepositoryImpl(androidContext(), get(), get(), get(), get()) }
factory<SearchableRepository<AppShortcut>>(named<AppShortcut>()) { get<AppShortcutRepository>() }
factory<SearchableDeserializer>(named(LauncherShortcut.Domain)) { LauncherShortcutDeserializer(androidContext()) }
factory<SearchableDeserializer>(named(LegacyShortcut.Domain)) { LegacyShortcutDeserializer(androidContext()) }