mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Move settings position
This commit is contained in:
@@ -445,11 +445,11 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
|
||||
getString(R.string.setting_icon_pack_choose_key),
|
||||
getString(R.string.list_entries_show_username_key),
|
||||
getString(R.string.list_groups_show_number_entries_key),
|
||||
getString(R.string.show_otp_token_key),
|
||||
getString(R.string.show_uuid_key),
|
||||
getString(R.string.list_size_key),
|
||||
getString(R.string.monospace_font_fields_enable_key),
|
||||
getString(R.string.hide_expired_entries_key),
|
||||
getString(R.string.show_otp_token_key),
|
||||
getString(R.string.show_uuid_key),
|
||||
getString(R.string.enable_education_screens_key),
|
||||
getString(R.string.reset_education_screens_key) -> {
|
||||
DATABASE_PREFERENCE_CHANGED = true
|
||||
|
||||
@@ -122,22 +122,22 @@ object PreferencesUtil {
|
||||
context.resources.getBoolean(R.bool.list_groups_show_number_entries_default))
|
||||
}
|
||||
|
||||
fun showExpiredEntries(context: Context): Boolean {
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
return ! prefs.getBoolean(context.getString(R.string.hide_expired_entries_key),
|
||||
context.resources.getBoolean(R.bool.hide_expired_entries_default))
|
||||
}
|
||||
|
||||
fun showOTPToken(context: Context): Boolean {
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
return prefs.getBoolean(context.getString(R.string.show_otp_token_key),
|
||||
context.resources.getBoolean(R.bool.show_otp_token_default))
|
||||
context.resources.getBoolean(R.bool.show_otp_token_default))
|
||||
}
|
||||
|
||||
fun showUUID(context: Context): Boolean {
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
return prefs.getBoolean(context.getString(R.string.show_uuid_key),
|
||||
context.resources.getBoolean(R.bool.show_uuid_default))
|
||||
context.resources.getBoolean(R.bool.show_uuid_default))
|
||||
}
|
||||
|
||||
fun showExpiredEntries(context: Context): Boolean {
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
return ! prefs.getBoolean(context.getString(R.string.hide_expired_entries_key),
|
||||
context.resources.getBoolean(R.bool.hide_expired_entries_default))
|
||||
}
|
||||
|
||||
fun getStyle(context: Context): String {
|
||||
@@ -654,11 +654,11 @@ object PreferencesUtil {
|
||||
context.getString(R.string.setting_icon_pack_choose_key) -> editor.putString(name, value)
|
||||
context.getString(R.string.list_entries_show_username_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
context.getString(R.string.list_groups_show_number_entries_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
context.getString(R.string.show_otp_token_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
context.getString(R.string.show_uuid_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
context.getString(R.string.list_size_key) -> editor.putString(name, value)
|
||||
context.getString(R.string.monospace_font_fields_enable_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
context.getString(R.string.hide_expired_entries_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
context.getString(R.string.show_otp_token_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
context.getString(R.string.show_uuid_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
context.getString(R.string.enable_education_screens_key) -> editor.putBoolean(name, value.toBoolean())
|
||||
|
||||
context.getString(R.string.sort_node_key) -> editor.putString(name, value)
|
||||
|
||||
@@ -187,15 +187,15 @@
|
||||
<bool name="list_entries_show_username_default" translatable="false">true</bool>
|
||||
<string name="list_groups_show_number_entries_key" translatable="false">list_groups_show_number_entries_key</string>
|
||||
<bool name="list_groups_show_number_entries_default" translatable="false">true</bool>
|
||||
<string name="show_otp_token_key" translatable="false">show_otp_token_key</string>
|
||||
<bool name="show_otp_token_default" translatable="false">true</bool>
|
||||
<string name="show_uuid_key" translatable="false">show_uuid_key</string>
|
||||
<bool name="show_uuid_default" translatable="false">false</bool>
|
||||
<string name="list_size_key" translatable="false">list_size_key</string>
|
||||
<string name="monospace_font_fields_enable_key" translatable="false">monospace_font_extra_fields_enable_key</string>
|
||||
<bool name="monospace_font_fields_enable_default" translatable="false">true</bool>
|
||||
<string name="hide_expired_entries_key" translatable="false">hide_expired_entries_key</string>
|
||||
<bool name="hide_expired_entries_default" translatable="false">false</bool>
|
||||
<string name="show_otp_token_key" translatable="false">show_otp_token_key</string>
|
||||
<bool name="show_otp_token_default" translatable="false">true</bool>
|
||||
<string name="show_uuid_key" translatable="false">show_uuid_key</string>
|
||||
<bool name="show_uuid_default" translatable="false">false</bool>
|
||||
<string name="enable_education_screens_key" translatable="false">enable_education_screens_key</string>
|
||||
<bool name="enable_education_screens_default" translatable="false">true</bool>
|
||||
<string name="reset_education_screens_key" translatable="false">relaunch_education_screens_key</string>
|
||||
|
||||
@@ -200,6 +200,10 @@
|
||||
<string name="list_entries_show_username_title">Show usernames</string>
|
||||
<string name="list_entries_show_username_summary">Show usernames in entry lists</string>
|
||||
<string name="list_groups_show_number_entries_title">Show number of entries</string>
|
||||
<string name="show_otp_token_title">Show OTP Token</string>
|
||||
<string name="show_otp_token_summary">Displays OTP tokens in the list of entries</string>
|
||||
<string name="show_uuid_title">Show UUID</string>
|
||||
<string name="show_uuid_summary">Displays the UUID linked to an entry or a group</string>
|
||||
<string name="list_groups_show_number_entries_summary">Show the number of entries in a group</string>
|
||||
<string name="list_size_title">Size of list items</string>
|
||||
<string name="list_size_summary">Text size in the element list</string>
|
||||
@@ -639,8 +643,4 @@
|
||||
<string name="icon_pack_choose_summary">Icon pack used in the app</string>
|
||||
<string name="hide_expired_entries_title">Hide expired entries</string>
|
||||
<string name="hide_expired_entries_summary">Expired entries are not shown</string>
|
||||
<string name="show_uuid_title">Show UUID</string>
|
||||
<string name="show_uuid_summary">Displays the UUID linked to an entry or a group</string>
|
||||
<string name="show_otp_token_title">Show OTP Token</string>
|
||||
<string name="show_otp_token_summary">Displays OTP tokens in the list of entries</string>
|
||||
</resources>
|
||||
@@ -56,6 +56,16 @@
|
||||
android:title="@string/list_groups_show_number_entries_title"
|
||||
android:summary="@string/list_groups_show_number_entries_summary"
|
||||
android:defaultValue="@bool/list_groups_show_number_entries_default"/>
|
||||
<SwitchPreference
|
||||
android:key="@string/show_otp_token_key"
|
||||
android:title="@string/show_otp_token_title"
|
||||
android:summary="@string/show_otp_token_summary"
|
||||
android:defaultValue="@bool/show_otp_token_default"/>
|
||||
<SwitchPreference
|
||||
android:key="@string/show_uuid_key"
|
||||
android:title="@string/show_uuid_title"
|
||||
android:summary="@string/show_uuid_summary"
|
||||
android:defaultValue="@bool/show_uuid_default"/>
|
||||
<ListPreference
|
||||
android:key="@string/list_size_key"
|
||||
android:title="@string/list_size_title"
|
||||
@@ -80,16 +90,6 @@
|
||||
android:title="@string/hide_expired_entries_title"
|
||||
android:summary="@string/hide_expired_entries_summary"
|
||||
android:defaultValue="@bool/hide_expired_entries_default"/>
|
||||
<SwitchPreference
|
||||
android:key="@string/show_otp_token_key"
|
||||
android:title="@string/show_otp_token_title"
|
||||
android:summary="@string/show_otp_token_summary"
|
||||
android:defaultValue="@bool/show_otp_token_default"/>
|
||||
<SwitchPreference
|
||||
android:key="@string/show_uuid_key"
|
||||
android:title="@string/show_uuid_title"
|
||||
android:summary="@string/show_uuid_summary"
|
||||
android:defaultValue="@bool/show_uuid_default"/>
|
||||
<SwitchPreference
|
||||
android:key="@string/enable_education_screens_key"
|
||||
android:title="@string/enable_education_screens_title"
|
||||
|
||||
Reference in New Issue
Block a user