mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Upgrade libs
This commit is contained in:
@@ -106,7 +106,7 @@ dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "com.android.support:multidex:1.0.3"
|
||||
implementation "androidx.appcompat:appcompat:$android_appcompat_version"
|
||||
implementation 'androidx.preference:preference-ktx:1.1.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
|
||||
@@ -115,7 +115,7 @@ dependencies {
|
||||
implementation 'androidx.media:media:1.4.3'
|
||||
// Lifecycle - LiveData - ViewModel - Coroutines
|
||||
implementation "androidx.core:core-ktx:$android_core_version"
|
||||
implementation 'androidx.fragment:fragment-ktx:1.4.0'
|
||||
implementation 'androidx.fragment:fragment-ktx:1.4.1'
|
||||
implementation "com.google.android.material:material:$android_material_version"
|
||||
// Token auto complete
|
||||
// From sources until https://github.com/splitwise/TokenAutoComplete/pull/422 fixed
|
||||
|
||||
@@ -41,12 +41,12 @@ class AutofillSettingsFragment : PreferenceFragmentCompat() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDisplayPreferenceDialog(preference: Preference?) {
|
||||
override fun onDisplayPreferenceDialog(preference: Preference) {
|
||||
var otherDialogFragment = false
|
||||
|
||||
var dialogFragment: DialogFragment? = null
|
||||
|
||||
when (preference?.key) {
|
||||
when (preference.key) {
|
||||
getString(R.string.autofill_application_id_blocklist_key) -> {
|
||||
dialogFragment = AutofillBlocklistAppIdPreferenceDialogFragmentCompat.newInstance(preference.key)
|
||||
}
|
||||
|
||||
@@ -34,13 +34,13 @@ class MagikeyboardSettingsFragment : PreferenceFragmentCompat() {
|
||||
setPreferencesFromResource(R.xml.preferences_keyboard, rootKey)
|
||||
}
|
||||
|
||||
override fun onDisplayPreferenceDialog(preference: Preference?) {
|
||||
override fun onDisplayPreferenceDialog(preference: Preference) {
|
||||
|
||||
var otherDialogFragment = false
|
||||
|
||||
var dialogFragment: DialogFragment? = null
|
||||
// Main Preferences
|
||||
when (preference?.key) {
|
||||
when (preference.key) {
|
||||
getString(R.string.keyboard_entry_timeout_key) -> {
|
||||
dialogFragment = DurationDialogFragmentCompat.newInstance(preference.key)
|
||||
}
|
||||
|
||||
@@ -437,9 +437,9 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPreferenceTreeClick(preference: Preference?): Boolean {
|
||||
override fun onPreferenceTreeClick(preference: Preference): Boolean {
|
||||
// To reload group when appearance settings are modified
|
||||
when (preference?.key) {
|
||||
when (preference.key) {
|
||||
getString(R.string.setting_style_key),
|
||||
getString(R.string.setting_style_brightness_key),
|
||||
getString(R.string.setting_icon_pack_choose_key),
|
||||
@@ -459,13 +459,13 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
|
||||
return super.onPreferenceTreeClick(preference)
|
||||
}
|
||||
|
||||
override fun onDisplayPreferenceDialog(preference: Preference?) {
|
||||
override fun onDisplayPreferenceDialog(preference: Preference) {
|
||||
|
||||
var otherDialogFragment = false
|
||||
|
||||
var dialogFragment: DialogFragment? = null
|
||||
// Main Preferences
|
||||
when (preference?.key) {
|
||||
when (preference.key) {
|
||||
getString(R.string.app_timeout_key),
|
||||
getString(R.string.clipboard_timeout_key),
|
||||
getString(R.string.temp_advanced_unlock_timeout_key) -> {
|
||||
|
||||
@@ -155,18 +155,22 @@ class NestedDatabaseSettingsFragment : NestedSettingsFragment(), DatabaseRetriev
|
||||
|
||||
// Database name
|
||||
dbNamePref = findPreference(getString(R.string.database_name_key))
|
||||
if (database.allowName) {
|
||||
dbNamePref?.summary = database.name
|
||||
} else {
|
||||
dbGeneralPrefCategory?.removePreference(dbNamePref)
|
||||
dbNamePref?.let { namePreference ->
|
||||
if (database.allowName) {
|
||||
namePreference.summary = database.name
|
||||
} else {
|
||||
dbGeneralPrefCategory?.removePreference(namePreference)
|
||||
}
|
||||
}
|
||||
|
||||
// Database description
|
||||
dbDescriptionPref = findPreference(getString(R.string.database_description_key))
|
||||
if (database.allowDescription) {
|
||||
dbDescriptionPref?.summary = database.description
|
||||
} else {
|
||||
dbGeneralPrefCategory?.removePreference(dbDescriptionPref)
|
||||
dbDescriptionPref?.let { descriptionPreference ->
|
||||
if (database.allowDescription) {
|
||||
dbDescriptionPref?.summary = database.description
|
||||
} else {
|
||||
dbGeneralPrefCategory?.removePreference(descriptionPreference)
|
||||
}
|
||||
}
|
||||
|
||||
// Database default username
|
||||
@@ -355,7 +359,7 @@ class NestedDatabaseSettingsFragment : NestedSettingsFragment(), DatabaseRetriev
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
val view = super.onCreateView(inflater, container, savedInstanceState)
|
||||
|
||||
try {
|
||||
@@ -565,13 +569,13 @@ class NestedDatabaseSettingsFragment : NestedSettingsFragment(), DatabaseRetriev
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDisplayPreferenceDialog(preference: Preference?) {
|
||||
override fun onDisplayPreferenceDialog(preference: Preference) {
|
||||
|
||||
var otherDialogFragment = false
|
||||
|
||||
var dialogFragment: DialogFragment? = null
|
||||
// Main Preferences
|
||||
when (preference?.key) {
|
||||
when (preference.key) {
|
||||
getString(R.string.database_name_key) -> {
|
||||
dialogFragment = DatabaseNamePreferenceDialogFragmentCompat.newInstance(preference.key)
|
||||
}
|
||||
@@ -687,9 +691,9 @@ class NestedDatabaseSettingsFragment : NestedSettingsFragment(), DatabaseRetriev
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPreferenceTreeClick(preference: Preference?): Boolean {
|
||||
override fun onPreferenceTreeClick(preference: Preference): Boolean {
|
||||
// To reload group when database settings are modified
|
||||
when (preference?.key) {
|
||||
when (preference.key) {
|
||||
getString(R.string.database_name_key),
|
||||
getString(R.string.database_description_key),
|
||||
getString(R.string.database_default_username_key),
|
||||
|
||||
@@ -61,9 +61,9 @@ class DurationDialogPreference @JvmOverloads constructor(context: Context,
|
||||
}
|
||||
}
|
||||
|
||||
override fun onGetDefaultValue(a: TypedArray?, index: Int): Any {
|
||||
override fun onGetDefaultValue(a: TypedArray, index: Int): Any {
|
||||
return try {
|
||||
a?.getString(index)?.toLongOrNull() ?: mDuration
|
||||
a.getString(index)?.toLongOrNull() ?: mDuration
|
||||
} catch (e: Exception) {
|
||||
mDuration
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ open class InputKdfNumberPreference @JvmOverloads constructor(context: Context,
|
||||
return R.layout.pref_dialog_input_numbers
|
||||
}
|
||||
|
||||
override fun setSummary(summary: CharSequence) {
|
||||
override fun setSummary(summary: CharSequence?) {
|
||||
if (summary == UNKNOWN_VALUE_STRING) {
|
||||
isEnabled = false
|
||||
super.setSummary("")
|
||||
|
||||
@@ -30,7 +30,7 @@ class InputKdfSizePreference @JvmOverloads constructor(context: Context,
|
||||
defStyleRes: Int = defStyleAttr)
|
||||
: InputKdfNumberPreference(context, attrs, defStyleAttr, defStyleRes) {
|
||||
|
||||
override fun setSummary(summary: CharSequence) {
|
||||
override fun setSummary(summary: CharSequence?) {
|
||||
if (summary == UNKNOWN_VALUE_STRING) {
|
||||
super.setSummary(summary)
|
||||
} else {
|
||||
|
||||
@@ -34,7 +34,7 @@ open class InputNumberPreference @JvmOverloads constructor(context: Context,
|
||||
return R.layout.pref_dialog_input_numbers
|
||||
}
|
||||
|
||||
override fun setSummary(summary: CharSequence) {
|
||||
override fun setSummary(summary: CharSequence?) {
|
||||
if (summary == INFINITE_VALUE_STRING) {
|
||||
super.setSummary("∞")
|
||||
} else {
|
||||
|
||||
@@ -30,7 +30,7 @@ open class InputSizePreference @JvmOverloads constructor(context: Context,
|
||||
defStyleRes: Int = defStyleAttr)
|
||||
: InputNumberPreference(context, attrs, defStyleAttr, defStyleRes) {
|
||||
|
||||
override fun setSummary(summary: CharSequence) {
|
||||
override fun setSummary(summary: CharSequence?) {
|
||||
var summaryString = summary
|
||||
try {
|
||||
val memorySize = summary.toString().toLong()
|
||||
|
||||
Reference in New Issue
Block a user