From 0389642543f909a4fab31bbf6bf00b9d847bbdc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Sat, 11 Sep 2021 19:40:09 +0200 Subject: [PATCH] Fix empty list on excuse submit (#1501) --- .../wulkanowy/ui/modules/attendance/AttendancePresenter.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendancePresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendancePresenter.kt index fc37e50de..03545b25b 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendancePresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendancePresenter.kt @@ -152,6 +152,8 @@ class AttendancePresenter @Inject constructor( fun onExcuseDialogSubmit(reason: String) { view?.finishActionMode() + if (attendanceToExcuseList.isEmpty()) return + if (isVulcanExcusedFunctionEnabled) { excuseAbsence( reason = reason.takeIf { it.isNotBlank() },