Feature: Respect hidden private space option (#1923)
* Hide private profile space apps from search when hide private space option is enabled, and add a search action for locking and unlocking the private space. * Filter private space apps from favorites while hidden
This commit is contained in:
@@ -45,6 +45,7 @@ import de.mm20.launcher2.database.migrations.Migration_28_29
|
||||
import de.mm20.launcher2.database.migrations.Migration_29_30
|
||||
import de.mm20.launcher2.database.migrations.Migration_30_31
|
||||
import de.mm20.launcher2.database.migrations.Migration_31_32
|
||||
import de.mm20.launcher2.database.migrations.Migration_32_33
|
||||
import de.mm20.launcher2.database.migrations.Migration_6_7
|
||||
import de.mm20.launcher2.database.migrations.Migration_7_8
|
||||
import de.mm20.launcher2.database.migrations.Migration_8_9
|
||||
@@ -68,7 +69,7 @@ import java.util.UUID
|
||||
ShapesEntity::class,
|
||||
TransparenciesEntity::class,
|
||||
TypographyEntity::class,
|
||||
], version = 32, exportSchema = true
|
||||
], version = 33, exportSchema = true
|
||||
)
|
||||
@TypeConverters(ComponentNameConverter::class)
|
||||
abstract class AppDatabase : RoomDatabase() {
|
||||
@@ -177,6 +178,7 @@ abstract class AppDatabase : RoomDatabase() {
|
||||
Migration_29_30(),
|
||||
Migration_30_31(),
|
||||
Migration_31_32(),
|
||||
Migration_32_33(),
|
||||
).build()
|
||||
if (_instance == null) _instance = instance
|
||||
return instance
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package de.mm20.launcher2.database.migrations
|
||||
|
||||
import androidx.room.migration.Migration
|
||||
import androidx.sqlite.db.SupportSQLiteDatabase
|
||||
|
||||
class Migration_32_33 : Migration(32, 33) {
|
||||
override fun migrate(database: SupportSQLiteDatabase) {
|
||||
database.execSQL(
|
||||
"INSERT INTO `SearchAction` (`position`, `type`) VALUES " +
|
||||
"((SELECT COALESCE(MIN(`position`) - 1, 0) FROM `SearchAction`), 'private_space')"
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user