Added toggle for enabling wallpaper changer
Refactored code for adding album Removed redundant code in WallpaperScreen Fixed wallpaper service handling when wallpaper is inaccessible Fixed issue where users could select albums with no valid wallpapers Updated version to 1.1.0 Updated album model to include current set wallpaper. Added database migration accordingly Added function to change wallpaper on home/lock preview depending on latest wallpaper set
This commit is contained in:
1 parent
4fd1e06b8e
commit
fc57f14d2a
23 files changed
+275
-140
No files matched your search
@@ -3,6 +3,8 @@ package com.anthonyla.paperize.di
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import androidx.room.Room
|
||||
import androidx.room.migration.Migration
|
||||
import androidx.sqlite.db.SupportSQLiteDatabase
|
||||
import com.anthonyla.paperize.data.settings.SettingsDataStore
|
||||
import com.anthonyla.paperize.data.settings.SettingsDataStoreImpl
|
||||
import com.anthonyla.paperize.feature.wallpaper.data.data_source.AlbumDatabase
|
||||
@@ -31,7 +33,7 @@ object AppModule {
|
||||
app,
|
||||
AlbumDatabase::class.java,
|
||||
AlbumDatabase.DATABASE_NAME
|
||||
).build()
|
||||
).addMigrations(MIGRATION_1_2).build()
|
||||
}
|
||||
|
||||
@Provides
|
||||
@@ -41,7 +43,7 @@ object AppModule {
|
||||
app,
|
||||
SelectedAlbumDatabase::class.java,
|
||||
SelectedAlbumDatabase.DATABASE_NAME
|
||||
).build()
|
||||
).addMigrations(MIGRATION_1_2).build()
|
||||
}
|
||||
|
||||
@Provides
|
||||
@@ -79,4 +81,10 @@ object AppModule {
|
||||
fun provideContext(
|
||||
@ApplicationContext context: Context,
|
||||
): Context { return context }
|
||||
}
|
||||
|
||||
val MIGRATION_1_2 = object : Migration(1, 2) {
|
||||
override fun migrate(db: SupportSQLiteDatabase) {
|
||||
db.execSQL("ALTER TABLE Album ADD COLUMN currentWallpaper TEXT")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user