mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Add Migration for autoDownloadWhileReading
This commit is contained in:
parent
c209836e77
commit
c2bd98b56a
1 changed files with 7 additions and 0 deletions
|
@ -22,6 +22,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.io.File
|
||||
import kotlin.math.max
|
||||
|
||||
object Migrations {
|
||||
|
||||
|
@ -202,6 +203,12 @@ object Migrations {
|
|||
preferences.secureScreen().set(PreferenceValues.SecureScreenMode.ALWAYS)
|
||||
}
|
||||
}
|
||||
if (oldVersion < 97) {
|
||||
val oldDLAfterReading = prefs.getInt("auto_download_after_reading", 0)
|
||||
if (oldDLAfterReading > 0) {
|
||||
preferences.autoDownloadWhileReading().set(max(2, oldDLAfterReading))
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue