Merge branch 'develop' into release/4.5.9

This commit is contained in:
J-Jamet committed 2026-11-23 22:28:48 +01:00
commit acdfd0910d
5 files changed
+18

No files matched your search

@@ -161,6 +161,8 @@ abstract class DatabaseLockActivity : DatabaseModeActivity() {
abstract fun viewToInvalidateTimeout(): View?
private fun showDatabaseAction(@StringRes stringId: Int) {
if (PreferencesUtil.showDatabaseActionMessages(this).not())
return
Toast.makeText(
this,
stringId,
@@ -516,6 +516,12 @@ object PreferencesUtil {
context.resources.getBoolean(R.bool.enable_auto_save_database_default))
}
fun showDatabaseActionMessages(context: Context): Boolean {
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
return prefs.getBoolean(context.getString(R.string.show_database_action_messages_key),
context.resources.getBoolean(R.bool.show_database_action_messages_default))
}
fun isKeepScreenOnEnabled(context: Context): Boolean {
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
return prefs.getBoolean(context.getString(R.string.enable_keep_screen_on_key),
@@ -925,6 +931,7 @@ object PreferencesUtil {
context.getString(R.string.user_verification_mode_key) -> editor.putBoolean(name, value.toBoolean())
context.getString(R.string.user_verification_device_credential_key) -> editor.putBoolean(name, value.toBoolean())
context.getString(R.string.enable_auto_save_database_key) -> editor.putBoolean(name, value.toBoolean())
context.getString(R.string.show_database_action_messages_key) -> editor.putBoolean(name, value.toBoolean())
context.getString(R.string.enable_keep_screen_on_key) -> editor.putBoolean(name, value.toBoolean())
context.getString(R.string.auto_focus_search_key) -> editor.putBoolean(name, value.toBoolean())
context.getString(R.string.subdomain_search_key) -> editor.putBoolean(name, value.toBoolean())
@@ -71,6 +71,8 @@
<bool name="delete_entered_password_default" translatable="false">true</bool>
<string name="enable_auto_save_database_key" translatable="false">enable_auto_save_database_key</string>
<bool name="enable_auto_save_database_default" translatable="false">true</bool>
<string name="show_database_action_messages_key" translatable="false">show_database_action_messages_key</string>
<bool name="show_database_action_messages_default" translatable="false">true</bool>
<string name="enable_keep_screen_on_key" translatable="false">enable_keep_screen_on_key</string>
<bool name="enable_keep_screen_on_default" translatable="false">true</bool>
<string name="enable_screenshot_mode_key" translatable="false">enable_screenshot_mode_key</string>
+2
View File
@@ -623,6 +623,8 @@
<string name="delete_entered_password_summary">Deletes the password entered after a connection attempt to a database</string>
<string name="enable_auto_save_database_title">Autosave database</string>
<string name="enable_auto_save_database_summary">Save the database after every important action (in \"Modifiable\" mode)</string>
<string name="show_database_action_messages_title">Show load and save messages</string>
<string name="show_database_action_messages_summary">Display a toast when the database is loaded, saved, merged or reloaded</string>
<string name="enable_keep_screen_on_title">Keep screen on</string>
<string name="enable_keep_screen_on_summary">Keep the screen on when watching or editing an entry</string>
<string name="enable_screenshot_mode_title">Screenshot mode</string>
@@ -37,6 +37,11 @@
android:title="@string/enable_auto_save_database_title"
android:summary="@string/enable_auto_save_database_summary"
android:defaultValue="@bool/enable_auto_save_database_default"/>
<SwitchPreferenceCompat
android:key="@string/show_database_action_messages_key"
android:title="@string/show_database_action_messages_title"
android:summary="@string/show_database_action_messages_summary"
android:defaultValue="@bool/show_database_action_messages_default"/>
<SwitchPreferenceCompat
android:key="@string/auto_focus_search_key"
android:title="@string/auto_focus_search_title"