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()
|
database.beginTransaction()
|
||||||
try {
|
try {
|
||||||
listOf("download", "update").forEach {
|
listOf("download", "update").forEach {
|
||||||
database.execSQL("ALTER TABLE `$it` ADD COLUMN targetSdk INTEGER NOT NULL")
|
database.execSQL("ALTER TABLE `$it` ADD COLUMN targetSdk INTEGER NOT NULL DEFAULT 1")
|
||||||
database.execSQL("UPDATE `$it` SET targetSdk=1")
|
|
||||||
}
|
}
|
||||||
database.setTransactionSuccessful()
|
database.setTransactionSuccessful()
|
||||||
} catch (exception: Exception) {
|
} catch (exception: Exception) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ data class Download(
|
|||||||
var downloadedFiles: Int,
|
var downloadedFiles: Int,
|
||||||
var fileList: List<File>,
|
var fileList: List<File>,
|
||||||
val sharedLibs: List<SharedLib>,
|
val sharedLibs: List<SharedLib>,
|
||||||
val targetSdk: Int,
|
val targetSdk: Int = 1,
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
val isFinished get() = downloadStatus in DownloadStatus.finished
|
val isFinished get() = downloadStatus in DownloadStatus.finished
|
||||||
val isRunning get() = downloadStatus in DownloadStatus.running
|
val isRunning get() = downloadStatus in DownloadStatus.running
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ data class Update(
|
|||||||
val offerType: Int,
|
val offerType: Int,
|
||||||
var fileList: List<File>,
|
var fileList: List<File>,
|
||||||
val sharedLibs: List<SharedLib>,
|
val sharedLibs: List<SharedLib>,
|
||||||
val targetSdk: Int
|
val targetSdk: Int = 1
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|||||||
Reference in New Issue
Block a user