AuroraListPreference: Consider the defaultReturnValue in getPersistedString method

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
ggabr
2024-06-20 19:46:47 +02:00
committed by Aayush Gupta
parent a9d1667405
commit 3615c39163

View File

@@ -51,7 +51,7 @@ class AuroraListPreference : ListPreference {
}
override fun getPersistedString(defaultReturnValue: String?): String? {
return getPersistedInt(-1).toString()
return getPersistedInt(defaultReturnValue?.toInt() ?: -1).toString()
}
override fun persistString(value: String?): Boolean {