Show pinned calendar events in favorites if calendar widget is disabled
This commit is contained in:
@@ -18,8 +18,8 @@ interface SearchDao {
|
||||
@Insert(onConflict = OnConflictStrategy.IGNORE)
|
||||
fun insertSkipExisting(items: FavoritesItemEntity)
|
||||
|
||||
@Query("SELECT * FROM Searchable WHERE pinned > 0 AND NOT `key` LIKE 'calendar://%' ORDER BY pinned DESC, launchCount DESC")
|
||||
fun getFavorites(): Flow<List<FavoritesItemEntity>>
|
||||
@Query("SELECT * FROM Searchable WHERE pinned > 0 AND (NOT :excludeCalendarEvents OR NOT `key` LIKE 'calendar://%') ORDER BY pinned DESC, launchCount DESC")
|
||||
fun getFavorites(excludeCalendarEvents: Boolean = false): Flow<List<FavoritesItemEntity>>
|
||||
|
||||
@Query("SELECT * FROM Searchable WHERE pinned > 0 AND `key` LIKE 'calendar://%' ORDER BY pinned DESC, launchCount DESC")
|
||||
fun getPinnedCalendarEvents(): Flow<List<FavoritesItemEntity>>
|
||||
|
||||
@@ -33,4 +33,7 @@ interface WidgetDao {
|
||||
|
||||
@Query("UPDATE Widget SET height = :newHeight WHERE data = :data AND type = :type")
|
||||
fun updateHeight(type: String, data: String, newHeight: Int)
|
||||
|
||||
@Query("SELECT EXISTS(SELECT 1 FROM Widget WHERE type = :type AND data = :data)")
|
||||
fun exists(type: String, data: String) : Flow<Boolean>
|
||||
}
|
||||
Reference in New Issue
Block a user