Implement custom legacy to adaptive icon transformations

This commit is contained in:
MM20
2022-07-24 20:47:10 +02:00
parent 5bd86e6f95
commit bb211d4d6a
12 changed files with 85 additions and 28 deletions
@@ -28,6 +28,7 @@ abstract class AppDatabase : RoomDatabase() {
abstract fun widgetDao(): WidgetDao
abstract fun currencyDao(): CurrencyDao
abstract fun backupDao(): BackupRestoreDao
abstract fun customAttrsDao(): CustomAttrsDao
companion object {
private var _instance: AppDatabase? = null
@@ -0,0 +1,12 @@
package de.mm20.launcher2.database
import androidx.room.Dao
import androidx.room.Query
import de.mm20.launcher2.database.entities.CustomAttributeEntity
import kotlinx.coroutines.flow.Flow
@Dao
interface CustomAttrsDao {
@Query("SELECT * FROM CustomAttributes WHERE type = 'icon' AND key = :key LIMIT 1")
fun getCustomIcon(key: String) : Flow<CustomAttributeEntity?>
}