From 8a825227cb5f44d40ea2fadf30da16e228eee635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Tue, 10 Mar 2020 23:45:40 +0100 Subject: [PATCH] [Timetable] Disable setting metadata for normal type lessons. --- .../szczodrzynski/edziennik/utils/managers/TimetableManager.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/utils/managers/TimetableManager.kt b/app/src/main/java/pl/szczodrzynski/edziennik/utils/managers/TimetableManager.kt index a9ea6695..7a5e89fe 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/utils/managers/TimetableManager.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/utils/managers/TimetableManager.kt @@ -25,6 +25,8 @@ class TimetableManager(val app: App) : CoroutineScope { fun markAsSeen(lesson: LessonFull) { lesson.seen = true + if (lesson.type <= Lesson.TYPE_NORMAL) + return startCoroutineTimer(500L, 0L) { app.db.metadataDao().setSeen(lesson.profileId, lesson, true) }