Skip to content

Commit d28aac5

Browse files
committed
fix(ResourceViewModel): update notifications UI state
1 parent f4f3835 commit d28aac5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/org/shirabox/app/ui/activity/resource/ResourceViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,10 @@ class ResourceViewModel @Inject constructor(@ApplicationContext context: Context
222222

223223
fun switchNotificationsStatus() {
224224
viewModelScope.launch(Dispatchers.IO) {
225-
shiraBoxAnime.value?.let { anime ->
225+
shiraBoxAnime.value?.let {
226226
val cachedContent = db.contentDao().getContentByUid(internalContentUid.longValue)
227227

228+
episodesNotifications.value = cachedContent.episodesNotifications.not()
228229
db.contentDao().updateContents(
229230
cachedContent.copy(episodesNotifications = cachedContent.episodesNotifications.not())
230231
)

0 commit comments

Comments
 (0)