fixup! OnboardingFragment: Improvements to auto-updates setup
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -30,8 +30,7 @@ object MigrationHelper {
|
||||
database.beginTransaction()
|
||||
try {
|
||||
listOf("download", "update").forEach {
|
||||
database.execSQL("ALTER TABLE `$it` ADD COLUMN targetSdk INTEGER NOT NULL")
|
||||
database.execSQL("UPDATE `$it` SET targetSdk=1")
|
||||
database.execSQL("ALTER TABLE `$it` ADD COLUMN targetSdk INTEGER NOT NULL DEFAULT 1")
|
||||
}
|
||||
database.setTransactionSuccessful()
|
||||
} catch (exception: Exception) {
|
||||
|
||||
@@ -28,7 +28,7 @@ data class Download(
|
||||
var downloadedFiles: Int,
|
||||
var fileList: List<File>,
|
||||
val sharedLibs: List<SharedLib>,
|
||||
val targetSdk: Int,
|
||||
val targetSdk: Int = 1,
|
||||
) : Parcelable {
|
||||
val isFinished get() = downloadStatus in DownloadStatus.finished
|
||||
val isRunning get() = downloadStatus in DownloadStatus.running
|
||||
|
||||
@@ -30,7 +30,7 @@ data class Update(
|
||||
val offerType: Int,
|
||||
var fileList: List<File>,
|
||||
val sharedLibs: List<SharedLib>,
|
||||
val targetSdk: Int
|
||||
val targetSdk: Int = 1
|
||||
) : Parcelable {
|
||||
|
||||
companion object {
|
||||
|
||||
Reference in New Issue
Block a user