[Notes] Hide notes button in day dialog.

This commit is contained in:
Kuba Szczodrzyński 2021-10-29 15:34:28 +02:00
parent 50cb0acc7d
commit a88cfb8ae3
4 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class DayDialog(
private val profileId: Int,
private val date: Date,
private val eventTypeId: Long? = null,
private val showNotes: Boolean = true,
private val showNotes: Boolean = false,
onShowListener: ((tag: String) -> Unit)? = null,
onDismissListener: ((tag: String) -> Unit)? = null,
) : BindingDialog<DialogDayBinding>(activity, onShowListener, onDismissListener) {
@ -212,6 +212,7 @@ class DayDialog(
onShowListener = onShowListener,
onDismissListener = onDismissListener,
)
b.legend.isVisible = showNotes
if (showNotes)
NoteManager.setLegendText(date, b.legend)
}

View File

@ -60,6 +60,7 @@ class AttendanceDetailsDialog(
onShowListener = onShowListener,
onDismissListener = onDismissListener,
)
b.legend.isVisible = showNotes
if (showNotes)
NoteManager.setLegendText(attendance, b.legend)
}

View File

@ -101,6 +101,7 @@ class GradeDetailsDialog(
onShowListener = onShowListener,
onDismissListener = onDismissListener,
)
b.legend.isVisible = showNotes
if (showNotes)
NoteManager.setLegendText(grade, b.legend)
}

View File

@ -259,6 +259,7 @@ class LessonDetailsDialog(
onShowListener = onShowListener,
onDismissListener = onDismissListener,
)
b.legend.isVisible = showNotes
if (showNotes)
NoteManager.setLegendText(lesson, b.legend)
}