Improve icon picker, add icon search

This commit is contained in:
MM20
2022-07-31 14:36:49 +02:00
parent 050e8284e7
commit a1e8c20b2b
11 changed files with 209 additions and 178 deletions
@@ -19,8 +19,8 @@ interface IconDao {
@Query("SELECT * FROM Icons WHERE componentName = :componentName AND (type = 'app' OR type = 'calendar')")
suspend fun getIconsFromAllPacks(componentName: String): List<IconEntity>
@Query("SELECT * FROM Icons WHERE iconPack = :iconPack AND (type = 'app' OR type = 'calendar') LIMIT :limit OFFSET :offset")
suspend fun getIcons(iconPack: String, offset: Int, limit: Int): List<IconEntity>
@Query("SELECT * FROM Icons WHERE (type = 'app' OR type = 'calendar') AND drawable LIKE :query ORDER BY iconPack, drawable LIMIT :limit")
suspend fun searchIconPackIcons(query: String, limit: Int = 100): List<IconEntity>
@Query("DELETE FROM Icons WHERE iconPack = :iconPack")
fun deleteIcons(iconPack: String)