diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/PreferencesRepository.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/PreferencesRepository.kt index 85c74072e..495415f9f 100644 --- a/app/src/main/java/io/github/wulkanowy/data/repositories/PreferencesRepository.kt +++ b/app/src/main/java/io/github/wulkanowy/data/repositories/PreferencesRepository.kt @@ -194,12 +194,6 @@ class PreferencesRepository @Inject constructor( ) ) - val showTimetableTimers: Boolean - get() = getBoolean( - R.string.pref_key_timetable_show_timers, - R.bool.pref_default_timetable_show_timers - ) - val showTimetableGaps: TimetableGapsMode get() = TimetableGapsMode.getByValue( getString( diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableAdapter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableAdapter.kt index 1201937c0..a957ef798 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableAdapter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableAdapter.kt @@ -325,7 +325,7 @@ class TimetableAdapter @Inject constructor() : override fun getChangePayload(oldItem: TimetableItem, newItem: TimetableItem): Any? { return if (oldItem is TimetableItem.Normal && newItem is TimetableItem.Normal) { - if (oldItem.lesson == newItem.lesson && oldItem.timeLeft != newItem.timeLeft) { + if (oldItem.lesson == newItem.lesson && oldItem.showGroupsInPlan == newItem.showGroupsInPlan && oldItem.timeLeft != newItem.timeLeft) { "time_left" } else super.getChangePayload(oldItem, newItem) } else super.getChangePayload(oldItem, newItem) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetablePresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetablePresenter.kt index f99970482..6b442d1c2 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetablePresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetablePresenter.kt @@ -1,5 +1,7 @@ package io.github.wulkanowy.ui.modules.timetable +import android.os.Handler +import android.os.Looper import io.github.wulkanowy.data.dataOrNull import io.github.wulkanowy.data.db.entities.Semester import io.github.wulkanowy.data.db.entities.Student @@ -236,11 +238,13 @@ class TimetablePresenter @Inject constructor( private fun updateData(lessons: List) { tickTimer?.cancel() - if (!prefRepository.showTimetableTimers) { + if (currentDate != now()) { view?.updateData(createItems(lessons)) } else { tickTimer = timer(period = 2_000) { - view?.updateData(createItems(lessons)) + Handler(Looper.getMainLooper()).post { + view?.updateData(createItems(lessons)) + } } } } diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 1749548e1..3af494fa4 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -713,7 +713,6 @@ Zobrazit přítomnost Motiv Rozvíjení známek - Označit aktuální lekci Zobrazit skupiny vedle předmětů Zobrazit prázdné dlaždice, kde není žádná lekce Zobrazit seznam grafů v známkách třídy diff --git a/app/src/main/res/values-da-rDK/strings.xml b/app/src/main/res/values-da-rDK/strings.xml index 500fba1f3..a89b83769 100644 --- a/app/src/main/res/values-da-rDK/strings.xml +++ b/app/src/main/res/values-da-rDK/strings.xml @@ -623,7 +623,6 @@ Show presence Theme Grades expanding - Mark current lesson Show groups next to subjects Show empty tiles where there\'s no lesson Show chart list in class grades diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index d8cc92984..4c9aa2d28 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -623,7 +623,6 @@ Anwesendheit zeigen Thema Steigende Sorten - Aktuelle Lektion markieren Gruppen neben Schulfächen anzeigen Show empty tiles where there\'s no lesson Liste der Diagramme in Klassenbewertungen anzeigen diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 500fba1f3..a89b83769 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -623,7 +623,6 @@ Show presence Theme Grades expanding - Mark current lesson Show groups next to subjects Show empty tiles where there\'s no lesson Show chart list in class grades diff --git a/app/src/main/res/values-it-rIT/strings.xml b/app/src/main/res/values-it-rIT/strings.xml index 500fba1f3..a89b83769 100644 --- a/app/src/main/res/values-it-rIT/strings.xml +++ b/app/src/main/res/values-it-rIT/strings.xml @@ -623,7 +623,6 @@ Show presence Theme Grades expanding - Mark current lesson Show groups next to subjects Show empty tiles where there\'s no lesson Show chart list in class grades diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 9375aeb39..31b9ce32c 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -713,7 +713,6 @@ Pokazuj obecność Motyw Rozwijanie ocen - Oznaczaj bieżącą lekcję Pokazuj grupę obok przedmiotu Pokazuj puste kafelki gdzie nie ma lekcji Pokazuj listę wykresów w ocenach klasy diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index a6e45d445..89a94a59d 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -713,7 +713,6 @@ Показывать присутствия Тема Разворачивание оценок - Отметить текущий урок Показать группы рядом с темами Show empty tiles where there\'s no lesson Показывать диаграммы в оценках класса diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index ed06e023e..3cde8152c 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -713,7 +713,6 @@ Zobraziť prítomnosť Motív Rozvijanie známok - Označiť aktuálne lekciu Zobraziť skupiny vedľa predmetov Zobraziť prázdne dlaždice, kde nie je žiadne lekcie Zobraziť zoznam grafov v známkach triedy diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 6a79263f7..20a917aa4 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -713,7 +713,6 @@ Показувати присутність Тема Розгортання оцінок - Позначити поточний урок Показувати групи поруч з темами Показувати порожні плитки там, де немає уроків Показувати діаграми в оцінках класу diff --git a/app/src/main/res/values/preferences_defaults.xml b/app/src/main/res/values/preferences_defaults.xml index 8d69f25c8..8e6fc7d66 100644 --- a/app/src/main/res/values/preferences_defaults.xml +++ b/app/src/main/res/values/preferences_defaults.xml @@ -22,7 +22,6 @@ false no alphabetic - false between false false diff --git a/app/src/main/res/values/preferences_keys.xml b/app/src/main/res/values/preferences_keys.xml index c48381e8c..5afffb649 100644 --- a/app/src/main/res/values/preferences_keys.xml +++ b/app/src/main/res/values/preferences_keys.xml @@ -27,7 +27,6 @@ grade_sorting_mode show_whole_class_plan show_groups_in_plan - timetable_show_timers timetable_show_gaps subjects_without_grades optional_arithmetic_average diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0ba9c9970..5cad09d0b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -701,7 +701,6 @@ Show presence Theme Grades expanding - Mark current lesson Show groups next to subjects Show empty tiles where there\'s no lesson Show chart list in class grades diff --git a/app/src/main/res/xml/scheme_preferences_appearance.xml b/app/src/main/res/xml/scheme_preferences_appearance.xml index 7177d396c..9c02a4910 100644 --- a/app/src/main/res/xml/scheme_preferences_appearance.xml +++ b/app/src/main/res/xml/scheme_preferences_appearance.xml @@ -90,11 +90,6 @@ android:layout_height="wrap_content" app:iconSpaceReserved="false" app:title="@string/pref_timetable_appearance_view"> -