Fix show error details button in additional lessons (#1225)

This commit is contained in:
Mikołaj Pich 2021-03-16 12:47:51 +01:00 committed by GitHub
parent 555b5ec112
commit 3f6159e976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -150,7 +150,7 @@ ext {
}
dependencies {
implementation "io.github.wulkanowy:sdk:1.1.1"
implementation "com.github.wulkanowy:sdk:340cf4ebd3"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

View File

@ -57,6 +57,7 @@ class AdditionalLessonsFragment :
additionalLessonsSwipe.setColorSchemeColors(requireContext().getThemeAttrColor(R.attr.colorPrimary))
additionalLessonsSwipe.setProgressBackgroundColorSchemeColor(requireContext().getThemeAttrColor(R.attr.colorSwipeRefresh))
additionalLessonsErrorRetry.setOnClickListener { presenter.onRetry() }
additionalLessonsErrorDetails.setOnClickListener { presenter.onDetailsClick() }
additionalLessonsPreviousButton.setOnClickListener { presenter.onPreviousDay() }
additionalLessonsNavDate.setOnClickListener { presenter.onPickDate() }

View File

@ -80,6 +80,10 @@ class AdditionalLessonsPresenter @Inject constructor(
loadData(currentDate, true)
}
fun onDetailsClick() {
view?.showErrorDetailsDialog(lastError)
}
private fun setBaseDateOnHolidays() {
flow {
val student = studentRepository.getCurrentStudent()