mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-21 05:21:52 +01:00
parent
ef863335e6
commit
3634b52e3a
@ -24,3 +24,9 @@ updates:
|
||||
SELECT *
|
||||
FROM updatesView
|
||||
WHERE dateUpload > :after;
|
||||
|
||||
getUpdatesByReadStatus:
|
||||
SELECT *
|
||||
FROM updatesView
|
||||
WHERE read = :read
|
||||
AND dateUpload > :after;
|
@ -16,7 +16,12 @@ class TachiyomiWidgetManager(
|
||||
) {
|
||||
|
||||
fun Context.init(scope: LifecycleCoroutineScope) {
|
||||
database.subscribeToList { updatesViewQueries.updates(after = UpdatesGridGlanceWidget.DateLimit.timeInMillis) }
|
||||
database.subscribeToList {
|
||||
updatesViewQueries.getUpdatesByReadStatus(
|
||||
read = false,
|
||||
after = UpdatesGridGlanceWidget.DateLimit.timeInMillis,
|
||||
)
|
||||
}
|
||||
.drop(1)
|
||||
.distinctUntilChanged()
|
||||
.onEach {
|
||||
|
@ -72,7 +72,12 @@ class UpdatesGridGlanceWidget : GlanceAppWidget() {
|
||||
|
||||
val processList = list
|
||||
?: Injekt.get<DatabaseHandler>()
|
||||
.awaitList { updatesViewQueries.updates(after = DateLimit.timeInMillis) }
|
||||
.awaitList {
|
||||
updatesViewQueries.getUpdatesByReadStatus(
|
||||
read = false,
|
||||
after = DateLimit.timeInMillis,
|
||||
)
|
||||
}
|
||||
val (rowCount, columnCount) = ids
|
||||
.flatMap { manager.getAppWidgetSizes(it) }
|
||||
.maxBy { it.height.value * it.width.value }
|
||||
|
Loading…
Reference in New Issue
Block a user