Added separate scheduling for lock screen

Added option to allow only changing lock screen
Updated wallpaper screen UI to match options selected
Updated wallpaper retrieval method to support lock and home screen separation in scheduling
Fixed issue where pressing back would sometimes freeze up
This commit is contained in:
Anthonyy232 committed 2024-05-23 01:57:54 -07:00
1 parent 0cc477b7e8
commit 58b24e50ff
79 files changed
+2031 -6564

No files matched your search

@@ -3,8 +3,6 @@ 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
@@ -33,7 +31,7 @@ object AppModule {
app,
AlbumDatabase::class.java,
AlbumDatabase.DATABASE_NAME
).addMigrations(MIGRATION_1_2).build()
).fallbackToDestructiveMigration().addMigrations().build()
}
@Provides
@@ -43,7 +41,7 @@ object AppModule {
app,
SelectedAlbumDatabase::class.java,
SelectedAlbumDatabase.DATABASE_NAME
).addMigrations(MIGRATION_1_2).build()
).fallbackToDestructiveMigration().addMigrations().build()
}
@Provides
@@ -81,10 +79,4 @@ 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")
}
}