complete timer plugin

This commit is contained in:
2022-12-14 11:50:02 +06:00
parent c632a2ba14
commit b9c78982b5
22 changed files with 304 additions and 52 deletions

View File

@@ -101,6 +101,7 @@ object Plugin : Plugin {
}
val post = postsRepo.getById(postId) ?: return false
ratingsRepo.set(postId, Rating(0.0))
for (content in post.content) {
runCatchingSafely {
val sent = send(
@@ -140,7 +141,7 @@ object Plugin : Plugin {
}
}
postsRepo.deletedObjectsIdsFlow.subscribeSafelyWithoutExceptions(this) { postId ->
ratingsRepo.onValueRemoved.subscribeSafelyWithoutExceptions(this) { postId ->
detachPoll(postId)
}