Migrate to XML Settings from Preferences (#722)

* Migrate to XML Settings from Preferences

* Lint
This commit is contained in:
Mitchell Syer
2023-10-29 11:01:46 -04:00
committed by GitHub
parent 60015bc041
commit 583a2f0fad
6 changed files with 126 additions and 31 deletions

View File

@@ -64,7 +64,7 @@ object DownloadManager {
Injekt.get<Application>().getSharedPreferences(DownloadManager::class.jvmName, Context.MODE_PRIVATE)
private fun loadDownloadQueue(): List<Int> {
return sharedPreferences.getStringSet(DOWNLOAD_QUEUE_KEY, emptySet())?.mapNotNull { it.toInt() } ?: emptyList()
return sharedPreferences.getStringSet(DOWNLOAD_QUEUE_KEY, emptySet())?.mapNotNull { it.toInt() }.orEmpty()
}
private fun saveDownloadQueue() {