Note widget: add dismiss action
This commit is contained in:
@@ -21,6 +21,7 @@ interface WidgetRepository {
|
||||
fun set(widgets: List<Widget>, parentId: UUID? = null)
|
||||
|
||||
fun exists(type: String): Flow<Boolean>
|
||||
fun count(type: String): Flow<Int>
|
||||
|
||||
suspend fun export(toDir: File)
|
||||
suspend fun import(fromDir: File)
|
||||
@@ -85,6 +86,12 @@ internal class WidgetRepositoryImpl(
|
||||
return dao.exists(type = type)
|
||||
}
|
||||
|
||||
override fun count(type: String): Flow<Int> {
|
||||
val dao = database.widgetDao()
|
||||
return dao.count(type = type)
|
||||
|
||||
}
|
||||
|
||||
|
||||
override suspend fun export(toDir: File) = withContext(Dispatchers.IO) {
|
||||
val dao = database.backupDao()
|
||||
|
||||
Reference in New Issue
Block a user