From 5ba8289c8707840ec45b1ba6d182d5052513c027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Thu, 16 Sep 2021 11:59:23 +0200 Subject: [PATCH] Display info in timetable as-is when lesson has change flag (#1521) --- app/build.gradle | 2 +- .../wulkanowy/ui/modules/timetable/TimetableDialog.kt | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8e8be8bb1..7436ffcda 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -157,7 +157,7 @@ ext { } dependencies { - implementation "io.github.wulkanowy:sdk:1.2.2" + implementation "io.github.wulkanowy:sdk:d74acd3989" coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableDialog.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableDialog.kt index 3f8622f85..bead8fb2c 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableDialog.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableDialog.kt @@ -13,7 +13,6 @@ import io.github.wulkanowy.R import io.github.wulkanowy.data.db.entities.Timetable import io.github.wulkanowy.databinding.DialogTimetableBinding import io.github.wulkanowy.utils.capitalise -import io.github.wulkanowy.utils.decapitalise import io.github.wulkanowy.utils.getThemeAttrColor import io.github.wulkanowy.utils.lifecycleAwareVariable import io.github.wulkanowy.utils.toFormattedString @@ -52,7 +51,7 @@ class TimetableDialog : DialogFragment() { super.onViewCreated(view, savedInstanceState) with(lesson) { - setInfo(info, teacher, canceled, changes) + setInfo(info, canceled, changes) setSubject(subject, subjectOld) setTeacher(teacher, teacherOld) setGroup(group) @@ -80,7 +79,7 @@ class TimetableDialog : DialogFragment() { } @SuppressLint("DefaultLocale") - private fun setInfo(info: String, teacher: String, canceled: Boolean, changes: Boolean) { + private fun setInfo(info: String, canceled: Boolean, changes: Boolean) { with(binding) { when { info.isNotBlank() -> { @@ -102,8 +101,6 @@ class TimetableDialog : DialogFragment() { timetableDialogChangesValue.text = when { canceled && !changes -> "Lekcja odwołana: $info" - changes && teacher.isNotBlank() -> "Zastępstwo: $teacher" - changes && teacher.isBlank() -> "Zastępstwo, ${info.decapitalise()}" else -> info.capitalise() } }