mirror of
https://github.com/openlibrecommunity/olcng.git
synced 2026-07-03 14:05:17 +02:00
Add 'Show All Groups' preference and handling
This commit is contained in:
@@ -51,6 +51,7 @@ object AppConfig {
|
||||
const val PREF_CONFIRM_REMOVE = "pref_confirm_remove"
|
||||
const val PREF_START_SCAN_IMMEDIATE = "pref_start_scan_immediate"
|
||||
const val PREF_DOUBLE_COLUMN_DISPLAY = "pref_double_column_display"
|
||||
const val PREF_GROUP_ALL_DISPLAY = "pref_group_all_display"
|
||||
const val PREF_LANGUAGE = "pref_language"
|
||||
const val PREF_UI_MODE_NIGHT = "pref_ui_mode_night"
|
||||
const val PREF_PREFER_IPV6 = "pref_prefer_ipv6"
|
||||
|
||||
@@ -79,5 +79,6 @@ class MmkvPreferenceDataStore : PreferenceDataStore() {
|
||||
}
|
||||
// Notify listeners that require service restart or reinit
|
||||
SettingsChangeManager.makeRestartService()
|
||||
SettingsChangeManager.makeSetupGroupTab()
|
||||
}
|
||||
}
|
||||
@@ -283,7 +283,9 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
|
||||
}
|
||||
|
||||
val groups = mutableListOf<GroupMapItem>()
|
||||
if (subscriptions.count() > 1) {
|
||||
if (subscriptions.size > 1
|
||||
&& MmkvManager.decodeSettingsBool(AppConfig.PREF_GROUP_ALL_DISPLAY)
|
||||
) {
|
||||
groups.add(
|
||||
GroupMapItem(
|
||||
id = "",
|
||||
|
||||
@@ -234,6 +234,8 @@
|
||||
<string name="title_pref_double_column_display">Enable double column display</string>
|
||||
<string name="summary_pref_double_column_display">The profile list is displayed in double columns, allowing more content to be displayed on the screen. You need to restart the application to take effect.</string>
|
||||
|
||||
<string name="title_pref_group_all_display">Enable show all groups</string>
|
||||
<string name="summary_pref_group_all_display">Add an extra "All Tabs" page</string>
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">ملاحظات</string>
|
||||
<string name="summary_pref_feedback">ملاحظات التحسينات أو الأخطاء إلى GitHub</string>
|
||||
|
||||
@@ -234,6 +234,8 @@
|
||||
<string name="title_pref_double_column_display">Enable double column display</string>
|
||||
<string name="summary_pref_double_column_display">The profile list is displayed in double columns, allowing more content to be displayed on the screen. You need to restart the application to take effect.</string>
|
||||
|
||||
<string name="title_pref_group_all_display">Enable show all groups</string>
|
||||
<string name="summary_pref_group_all_display">Add an extra "All Tabs" page</string>
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">মতামত</string>
|
||||
<string name="summary_pref_feedback">মতামত উন্নয়ন বা বাগগুলি GitHub-এ পাঠান</string>
|
||||
|
||||
@@ -234,6 +234,8 @@
|
||||
<string name="title_pref_double_column_display">ره وندن نشووݩ داڌن دو سۊتۊنی</string>
|
||||
<string name="summary_pref_double_column_display">نومگه نمایه یل من دو سۊتۊن نشووݩ داڌه ابۊن وو چینۉ ترین موئتوا بیشتری ن سیل کۊنین. سی ره وستن، وا برنومه ن ز نۊ ره ونین.</string>
|
||||
|
||||
<string name="title_pref_group_all_display">Enable show all groups</string>
|
||||
<string name="summary_pref_group_all_display">Add an extra "All Tabs" page</string>
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">فشناڌن منشڌ</string>
|
||||
<string name="summary_pref_feedback">فشناڌن منشڌ یا گوزارش موشکلا من Github</string>
|
||||
|
||||
@@ -232,6 +232,8 @@
|
||||
<string name="title_pref_double_column_display">فعال کردن نمایش دو ستون</string>
|
||||
<string name="summary_pref_double_column_display">لیست نمایه در دو ستون نمایش داده می شود و امکان نمایش محتوای بیشتری را بر روی صفحه نمایش می دهد. برای اجرا باید برنامه را مجددا راه اندازی کنید.</string>
|
||||
|
||||
<string name="title_pref_group_all_display">Enable show all groups</string>
|
||||
<string name="summary_pref_group_all_display">Add an extra "All Tabs" page</string>
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">بازخورد</string>
|
||||
<string name="summary_pref_feedback">بازخورد یا گزارش اشکالات در گیت هاب</string>
|
||||
|
||||
@@ -233,6 +233,8 @@
|
||||
<string name="title_pref_double_column_display">Профили в два столбца</string>
|
||||
<string name="summary_pref_double_column_display">Список профилей отображается двумя столбцами, что позволяет показать больше информации на экране. Требуется перезапуск приложения.</string>
|
||||
|
||||
<string name="title_pref_group_all_display">Enable show all groups</string>
|
||||
<string name="summary_pref_group_all_display">Add an extra "All Tabs" page</string>
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">Обратная связь</string>
|
||||
<string name="summary_pref_feedback">Предложить улучшение или сообщить об ошибке на GitHub</string>
|
||||
|
||||
@@ -234,6 +234,8 @@
|
||||
<string name="title_pref_double_column_display">Enable double column display</string>
|
||||
<string name="summary_pref_double_column_display">The profile list is displayed in double columns, allowing more content to be displayed on the screen. You need to restart the application to take effect.</string>
|
||||
|
||||
<string name="title_pref_group_all_display">Enable show all groups</string>
|
||||
<string name="summary_pref_group_all_display">Add an extra "All Tabs" page</string>
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">Phản hồi lỗi</string>
|
||||
<string name="summary_pref_feedback">Phản hồi cải tiến hoặc lỗi lên GitHub</string>
|
||||
|
||||
@@ -231,6 +231,9 @@
|
||||
<string name="title_pref_double_column_display">启用双列显示</string>
|
||||
<string name="summary_pref_double_column_display">配置列表以双列显示,允许在屏幕上显示更多内容。需要重启应用生效。</string>
|
||||
|
||||
<string name="title_pref_group_all_display">启用显示所有组</string>
|
||||
<string name="summary_pref_group_all_display">添加一个额外的“所有选项卡”页面</string>
|
||||
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">反馈</string>
|
||||
<string name="summary_pref_feedback">反馈改进或漏洞至 GitHub</string>
|
||||
|
||||
@@ -232,6 +232,9 @@
|
||||
<string name="title_pref_double_column_display">啟用雙列顯示</string>
|
||||
<string name="summary_pref_double_column_display">設定檔清單以雙列顯示,允許在螢幕上顯示更多內容。需要重啟應用生效。</string>
|
||||
|
||||
<string name="title_pref_group_all_display">啟用顯示所有群組</string>
|
||||
<string name="summary_pref_group_all_display">新增一個額外的「所有選項卡」頁面</string>
|
||||
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">意見回饋</string>
|
||||
<string name="summary_pref_feedback">前往 GitHub 回報錯誤</string>
|
||||
|
||||
@@ -237,6 +237,9 @@
|
||||
<string name="title_pref_double_column_display">Enable double column display</string>
|
||||
<string name="summary_pref_double_column_display">The profile list is displayed in double columns, allowing more content to be displayed on the screen. You need to restart the application to take effect.</string>
|
||||
|
||||
<string name="title_pref_group_all_display">Enable show all groups</string>
|
||||
<string name="summary_pref_group_all_display">Add an extra "All Tabs" page</string>
|
||||
|
||||
<!-- AboutActivity -->
|
||||
<string name="title_pref_feedback">Feedback</string>
|
||||
<string name="summary_pref_feedback">Feedback enhancements or bugs to GitHub</string>
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
android:summary="@string/summary_pref_double_column_display"
|
||||
android:title="@string/title_pref_double_column_display" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_group_all_display"
|
||||
android:summary="@string/summary_pref_group_all_display"
|
||||
android:title="@string/title_pref_group_all_display" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="auto"
|
||||
android:entries="@array/language_select"
|
||||
|
||||
Reference in New Issue
Block a user