From 7ec7afed87333af6ee460e87a57bb3bf3cb3a8fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Sep 2021 08:22:06 +0000 Subject: [PATCH 1/7] Bump firebase-bom from 28.4.0 to 28.4.1 (#1520) --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 74585998..8e8be8bb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -211,7 +211,7 @@ dependencies { implementation 'me.xdrop:fuzzywuzzy:1.3.1' implementation 'com.fredporciuncula:flow-preferences:1.5.0' - playImplementation platform('com.google.firebase:firebase-bom:28.4.0') + playImplementation platform('com.google.firebase:firebase-bom:28.4.1') playImplementation 'com.google.firebase:firebase-analytics-ktx' playImplementation 'com.google.firebase:firebase-messaging:' playImplementation 'com.google.firebase:firebase-crashlytics:' From 037dbd792f6d5b5381419ee6529cfc9156598e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Thu, 16 Sep 2021 10:51:38 +0200 Subject: [PATCH 2/7] Add conference dialog (#1519) --- .../modules/conference/ConferenceAdapter.kt | 7 +- .../ui/modules/conference/ConferenceDialog.kt | 60 +++++ .../modules/conference/ConferenceFragment.kt | 13 +- .../modules/conference/ConferencePresenter.kt | 5 + .../ui/modules/conference/ConferenceView.kt | 2 + .../SchoolAnnouncementDialog.kt | 2 +- app/src/main/res/layout/dialog_conference.xml | 211 ++++++++++++++++++ .../res/layout/dialog_school_announcement.xml | 1 + app/src/main/res/values/strings.xml | 6 +- 9 files changed, 303 insertions(+), 4 deletions(-) create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceDialog.kt create mode 100644 app/src/main/res/layout/dialog_conference.xml diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceAdapter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceAdapter.kt index c8728614..f63b293c 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceAdapter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceAdapter.kt @@ -14,6 +14,8 @@ class ConferenceAdapter @Inject constructor() : var items = emptyList() + var onItemClickListener: (Conference) -> Unit = {} + override fun getItemCount() = items.size override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ItemViewHolder( @@ -28,7 +30,10 @@ class ConferenceAdapter @Inject constructor() : conferenceItemTitle.text = item.title conferenceItemSubject.text = item.subject conferenceItemContent.text = item.agenda - conferenceItemContent.visibility = if (item.agenda.isBlank()) View.GONE else View.VISIBLE + conferenceItemContent.visibility = + if (item.agenda.isBlank()) View.GONE else View.VISIBLE + + root.setOnClickListener { onItemClickListener(item) } } } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceDialog.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceDialog.kt new file mode 100644 index 00000000..477b762b --- /dev/null +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceDialog.kt @@ -0,0 +1,60 @@ +package io.github.wulkanowy.ui.modules.conference + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.core.view.isVisible +import androidx.fragment.app.DialogFragment +import io.github.wulkanowy.data.db.entities.Conference +import io.github.wulkanowy.databinding.DialogConferenceBinding +import io.github.wulkanowy.utils.lifecycleAwareVariable +import io.github.wulkanowy.utils.toFormattedString + +class ConferenceDialog : DialogFragment() { + + private var binding: DialogConferenceBinding by lifecycleAwareVariable() + + private lateinit var conference: Conference + + companion object { + + private const val ARGUMENT_KEY = "item" + + fun newInstance(conference: Conference) = ConferenceDialog().apply { + arguments = Bundle().apply { putSerializable(ARGUMENT_KEY, conference) } + } + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setStyle(STYLE_NO_TITLE, 0) + arguments?.let { + conference = it.getSerializable(ARGUMENT_KEY) as Conference + } + } + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ) = DialogConferenceBinding.inflate(inflater).also { binding = it }.root + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + with(binding) { + conferenceDialogClose.setOnClickListener { dismiss() } + + conferenceDialogSubjectValue.text = conference.subject + conferenceDialogDateValue.text = conference.date.toFormattedString("dd.MM.yyyy HH:mm") + conferenceDialogHeaderValue.text = conference.title + conferenceDialogAgendaValue.text = conference.agenda + conferenceDialogPresentValue.text = conference.presentOnConference + conferenceDialogPresentValue.isVisible = conference.presentOnConference.isNotBlank() + conferenceDialogPresentTitle.isVisible = conference.presentOnConference.isNotBlank() + conferenceDialogAgendaValue.isVisible = conference.agenda.isNotBlank() + conferenceDialogAgendaTitle.isVisible = conference.agenda.isNotBlank() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceFragment.kt index dd10a65e..b9642b1c 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceFragment.kt @@ -8,6 +8,7 @@ import io.github.wulkanowy.R import io.github.wulkanowy.data.db.entities.Conference import io.github.wulkanowy.databinding.FragmentConferenceBinding import io.github.wulkanowy.ui.base.BaseFragment +import io.github.wulkanowy.ui.modules.main.MainActivity import io.github.wulkanowy.ui.modules.main.MainView import io.github.wulkanowy.ui.widgets.DividerItemDecoration import io.github.wulkanowy.utils.getThemeAttrColor @@ -41,6 +42,8 @@ class ConferenceFragment : BaseFragment(R.layout.frag } override fun initView() { + conferencesAdapter.onItemClickListener = presenter::onItemSelected + with(binding.conferenceRecycler) { layoutManager = LinearLayoutManager(context) adapter = conferencesAdapter @@ -50,7 +53,11 @@ class ConferenceFragment : BaseFragment(R.layout.frag with(binding) { conferenceSwipe.setOnRefreshListener(presenter::onSwipeRefresh) conferenceSwipe.setColorSchemeColors(requireContext().getThemeAttrColor(R.attr.colorPrimary)) - conferenceSwipe.setProgressBackgroundColorSchemeColor(requireContext().getThemeAttrColor(R.attr.colorSwipeRefresh)) + conferenceSwipe.setProgressBackgroundColorSchemeColor( + requireContext().getThemeAttrColor( + R.attr.colorSwipeRefresh + ) + ) conferenceErrorRetry.setOnClickListener { presenter.onRetry() } conferenceErrorDetails.setOnClickListener { presenter.onDetailsClick() } } @@ -98,6 +105,10 @@ class ConferenceFragment : BaseFragment(R.layout.frag binding.conferenceRecycler.visibility = if (show) View.VISIBLE else View.GONE } + override fun openConferenceDialog(conference: Conference) { + (activity as? MainActivity)?.showDialogFragment(ConferenceDialog.newInstance(conference)) + } + override fun onDestroyView() { presenter.onDetachView() super.onDestroyView() diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferencePresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferencePresenter.kt index cc7e50db..dab170da 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferencePresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferencePresenter.kt @@ -1,6 +1,7 @@ package io.github.wulkanowy.ui.modules.conference import io.github.wulkanowy.data.Status +import io.github.wulkanowy.data.db.entities.Conference import io.github.wulkanowy.data.repositories.ConferenceRepository import io.github.wulkanowy.data.repositories.SemesterRepository import io.github.wulkanowy.data.repositories.StudentRepository @@ -43,6 +44,10 @@ class ConferencePresenter @Inject constructor( loadData(true) } + fun onItemSelected(conference: Conference) { + view?.openConferenceDialog(conference) + } + fun onDetailsClick() { view?.showErrorDetailsDialog(lastError) } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceView.kt index f3d1b3b3..4f73394d 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceView.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/conference/ConferenceView.kt @@ -26,4 +26,6 @@ interface ConferenceView : BaseView { fun enableSwipe(enable: Boolean) fun showContent(show: Boolean) + + fun openConferenceDialog(conference: Conference) } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/schoolannouncement/SchoolAnnouncementDialog.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/schoolannouncement/SchoolAnnouncementDialog.kt index ed4b0ac9..7dcd51ce 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/schoolannouncement/SchoolAnnouncementDialog.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/schoolannouncement/SchoolAnnouncementDialog.kt @@ -38,7 +38,7 @@ class SchoolAnnouncementDialog : DialogFragment() { inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? - ) = DialogSchoolAnnouncementBinding.inflate(inflater).apply { binding = this }.root + ) = DialogSchoolAnnouncementBinding.inflate(inflater).also { binding = it }.root override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) diff --git a/app/src/main/res/layout/dialog_conference.xml b/app/src/main/res/layout/dialog_conference.xml new file mode 100644 index 00000000..d08edf4f --- /dev/null +++ b/app/src/main/res/layout/dialog_conference.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/dialog_school_announcement.xml b/app/src/main/res/layout/dialog_school_announcement.xml index cbce4e02..96c11d4a 100644 --- a/app/src/main/res/layout/dialog_school_announcement.xml +++ b/app/src/main/res/layout/dialog_school_announcement.xml @@ -118,6 +118,7 @@ android:layout_marginEnd="24dp" android:paddingStart="0dp" android:paddingEnd="16dp" + tools:maxLines="5" android:text="@string/all_no_data" android:textIsSelectable="true" android:textSize="16sp" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 295d8319..de85614b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -336,10 +336,12 @@ Today\'s lucky number is: %s Show history + Lucky number history No info about lucky numbers + Mobile devices No devices @@ -388,7 +390,8 @@ You have %1$d new conference You have %1$d new conferences - + Present at conference + Agenda School announcements @@ -585,6 +588,7 @@ Yes No Save + Title From da668f93cf309f4ae4c86f492b23849ca3c66dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Thu, 16 Sep 2021 11:24:52 +0200 Subject: [PATCH 3/7] Fix bugs in dashboard (#1517) --- .../ui/modules/dashboard/DashboardAdapter.kt | 11 +++- .../ui/modules/dashboard/DashboardFragment.kt | 9 ++-- .../modules/dashboard/DashboardPresenter.kt | 50 +++++++++++-------- .../ui/modules/timetable/TimetableFragment.kt | 14 +++++- .../res/layout/subitem_dashboard_grades.xml | 4 +- 5 files changed, 56 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/dashboard/DashboardAdapter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/dashboard/DashboardAdapter.kt index 0eda4932..11b575c1 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/dashboard/DashboardAdapter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/dashboard/DashboardAdapter.kt @@ -53,7 +53,7 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter Unit = {} - var onLessonsTileClickListener: () -> Unit = {} + var onLessonsTileClickListener: (LocalDate) -> Unit = {} var onHomeworkTileClickListener: () -> Unit = {} @@ -275,10 +275,12 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter { + dateToNavigate = currentDate updateLessonView(item, currentTimetable, binding) binding.dashboardLessonsItemTitleTomorrow.isVisible = false } tomorrowTimetable.isNotEmpty() -> { + dateToNavigate = tomorrowDate updateLessonView(item, tomorrowTimetable, binding) binding.dashboardLessonsItemTitleTomorrow.isVisible = true } currentDayHeader != null && currentDayHeader.content.isNotBlank() -> { + dateToNavigate = currentDate updateLessonView(item, emptyList(), binding, currentDayHeader) binding.dashboardLessonsItemTitleTomorrow.isVisible = false } tomorrowDayHeader != null && tomorrowDayHeader.content.isNotBlank() -> { + dateToNavigate = tomorrowDate updateLessonView(item, emptyList(), binding, tomorrowDayHeader) binding.dashboardLessonsItemTitleTomorrow.isVisible = true } else -> { + dateToNavigate = tomorrowDate updateLessonView(item, emptyList(), binding) binding.dashboardLessonsItemTitleTomorrow.isVisible = !(item.isLoading && item.error == null) @@ -326,7 +333,7 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter(R.layout.fragme override fun initView() { val mainActivity = requireActivity() as MainActivity val itemTouchHelper = ItemTouchHelper( - DashboardItemMoveCallback( - dashboardAdapter, - presenter::onDragAndDropEnd - ) + DashboardItemMoveCallback(dashboardAdapter, presenter::onDragAndDropEnd) ) dashboardAdapter.apply { @@ -87,7 +84,9 @@ class DashboardFragment : BaseFragment(R.layout.fragme onAttendanceTileClickListener = { mainActivity.pushView(AttendanceSummaryFragment.newInstance()) } - onLessonsTileClickListener = { mainActivity.pushView(TimetableFragment.newInstance()) } + onLessonsTileClickListener = { + mainActivity.pushView(TimetableFragment.newInstance(it)) + } onGradeTileClickListener = { mainActivity.pushView(GradeFragment.newInstance()) } onHomeworkTileClickListener = { mainActivity.pushView(HomeworkFragment.newInstance()) } onAnnouncementsTileClickListener = { diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/dashboard/DashboardPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/dashboard/DashboardPresenter.kt index 027bcc05..108a086b 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/dashboard/DashboardPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/dashboard/DashboardPresenter.kt @@ -492,31 +492,37 @@ class DashboardPresenter @Inject constructor( end = LocalDate.now().plusDays(7), forceRefresh = forceRefresh ) - }.onEach { - when (it.status) { - Status.LOADING -> { - Timber.i("Loading dashboard exams data started") - if (forceRefresh) return@onEach - updateData( - DashboardItem.Exams(it.data.orEmpty(), isLoading = true), - forceRefresh - ) + } + .map { examResource -> + val sortedExams = examResource.data?.sortedBy { it.date } - if (!it.data.isNullOrEmpty()) { - firstLoadedItemList += DashboardItem.Type.EXAMS + examResource.copy(data = sortedExams) + } + .onEach { + when (it.status) { + Status.LOADING -> { + Timber.i("Loading dashboard exams data started") + if (forceRefresh) return@onEach + updateData( + DashboardItem.Exams(it.data.orEmpty(), isLoading = true), + forceRefresh + ) + + if (!it.data.isNullOrEmpty()) { + firstLoadedItemList += DashboardItem.Type.EXAMS + } + } + Status.SUCCESS -> { + Timber.i("Loading dashboard exams result: Success") + updateData(DashboardItem.Exams(it.data ?: emptyList()), forceRefresh) + } + Status.ERROR -> { + Timber.i("Loading dashboard exams result: An exception occurred") + errorHandler.dispatch(it.error!!) + updateData(DashboardItem.Exams(error = it.error), forceRefresh) } } - Status.SUCCESS -> { - Timber.i("Loading dashboard exams result: Success") - updateData(DashboardItem.Exams(it.data ?: emptyList()), forceRefresh) - } - Status.ERROR -> { - Timber.i("Loading dashboard exams result: An exception occurred") - errorHandler.dispatch(it.error!!) - updateData(DashboardItem.Exams(error = it.error), forceRefresh) - } - } - }.launch("dashboard_exams") + }.launch("dashboard_exams") } private fun loadConferences(student: Student, forceRefresh: Boolean) { diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableFragment.kt index 83218a0d..4478a2a6 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableFragment.kt @@ -44,7 +44,13 @@ class TimetableFragment : BaseFragment(R.layout.fragme companion object { private const val SAVED_DATE_KEY = "CURRENT_DATE" - fun newInstance() = TimetableFragment() + private const val ARGUMENT_DATE_KEY = "ARGUMENT_DATE" + + fun newInstance(date: LocalDate? = null) = TimetableFragment().apply { + arguments = Bundle().apply { + date?.let { putLong(ARGUMENT_DATE_KEY, it.toEpochDay()) } + } + } } override val titleStringId get() = R.string.timetable_title @@ -62,7 +68,11 @@ class TimetableFragment : BaseFragment(R.layout.fragme super.onViewCreated(view, savedInstanceState) binding = FragmentTimetableBinding.bind(view) messageContainer = binding.timetableRecycler - presenter.onAttachView(this, savedInstanceState?.getLong(SAVED_DATE_KEY)) + + val initDate = savedInstanceState?.getLong(SAVED_DATE_KEY) + ?: arguments?.getLong(ARGUMENT_DATE_KEY)?.takeUnless { it == 0L } + + presenter.onAttachView(this, initDate) } override fun initView() { diff --git a/app/src/main/res/layout/subitem_dashboard_grades.xml b/app/src/main/res/layout/subitem_dashboard_grades.xml index 61faa6ac..9354be3d 100644 --- a/app/src/main/res/layout/subitem_dashboard_grades.xml +++ b/app/src/main/res/layout/subitem_dashboard_grades.xml @@ -11,12 +11,13 @@ android:layout_height="wrap_content" android:ellipsize="end" android:includeFontPadding="false" + android:maxEms="15" android:maxLines="1" android:textSize="13sp" app:layout_constraintBottom_toBottomOf="@id/dashboard_grades_subitem_grade_container" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="@id/dashboard_grades_subitem_grade_container" - tools:text="Urządzenia techniki kompu..." /> + tools:text="Urządzenia techniki komputerowych" /> From c568bc1515c3937e9b5bc5b3da959a27bdc28757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Thu, 16 Sep 2021 11:29:11 +0200 Subject: [PATCH 4/7] Fix ghost account after logout not current student (#1518) --- .../accountdetails/AccountDetailsFragment.kt | 6 +++++- .../accountdetails/AccountDetailsPresenter.kt | 15 +++++++++++---- .../account/accountdetails/AccountDetailsView.kt | 4 +++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsFragment.kt index a9890ad9..c3137ec5 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsFragment.kt @@ -121,10 +121,14 @@ class AccountDetailsFragment : } } - override fun popView() { + override fun popViewToMain() { (requireActivity() as MainActivity).popView(2) } + override fun popViewToAccounts() { + (requireActivity() as MainActivity).popView(1) + } + override fun recreateMainView() { requireActivity().recreate() } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsPresenter.kt index d4cba580..1f44cbbc 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsPresenter.kt @@ -119,7 +119,7 @@ class AccountDetailsPresenter @Inject constructor( } } }.afterLoading { - view?.popView() + view?.popViewToMain() }.launch("switch") } @@ -152,11 +152,14 @@ class AccountDetailsPresenter @Inject constructor( syncManager.stopSyncWorker() openClearLoginView() } - studentWithSemesters!!.student.isCurrent -> { + studentWithSemesters?.student?.isCurrent == true -> { Timber.i("Logout result: Logout student and switch to another") recreateMainView() } - else -> Timber.i("Logout result: Logout student") + else -> { + Timber.i("Logout result: Logout student") + recreateMainView() + } } } Status.ERROR -> { @@ -165,7 +168,11 @@ class AccountDetailsPresenter @Inject constructor( } } }.afterLoading { - view?.popView() + if (studentWithSemesters?.student?.isCurrent == true) { + view?.popViewToMain() + } else { + view?.popViewToAccounts() + } }.launch("logout") } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsView.kt index 652f0c1a..aeb743fa 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsView.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsView.kt @@ -15,7 +15,9 @@ interface AccountDetailsView : BaseView { fun showLogoutConfirmDialog() - fun popView() + fun popViewToMain() + + fun popViewToAccounts() fun recreateMainView() From 258782c6481e13935ca6724bbd17b820f5dead80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Thu, 16 Sep 2021 11:30:05 +0200 Subject: [PATCH 5/7] New Crowdin updates (#1482) --- app/src/main/res/values-cs/strings.xml | 43 ++++++++++++++------------ app/src/main/res/values-de/strings.xml | 3 ++ app/src/main/res/values-pl/strings.xml | 37 ++++++++++++---------- app/src/main/res/values-ru/strings.xml | 3 ++ app/src/main/res/values-sk/strings.xml | 43 ++++++++++++++------------ app/src/main/res/values-uk/strings.xml | 3 ++ 6 files changed, 75 insertions(+), 57 deletions(-) diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index fedbc903..33ac3616 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -402,6 +402,8 @@ Máte %1$d nových setkání Máte %1$d nových setkání + Present at conference + Agenda Školní oznámení Žádná školní oznámení @@ -516,10 +518,10 @@ Další: Později: - ještě %1$d další lekce - ještě %1$d další lekce - ještě %1$d dalších lekcí - ještě %1$d dalších lekcí + ještě %1$d lekce + ještě %1$d lekce + ještě %1$d lekcí + ještě %1$d lekcí do %1$s Žádné nadcházející lekce @@ -528,10 +530,10 @@ Žádné domácí úkoly do vykonána Při načítání domácích úkolů došlo k chybě - Ještě %1$d další domácí úkol - Ještě %1$d další domácí úkoly - Ještě %1$d dalších domácích úkolů - Ještě %1$d dalších domácích úkolů + Ještě %1$d domácí úkol + Ještě %1$d domácí úkoly + Ještě %1$d domácích úkolů + Ještě %1$d domácích úkolů do %1$s Poslední známky @@ -541,28 +543,28 @@ Žádná aktuální oznámení Při načítání oznámení došlo k chybě - Ještě %1$d další oznámení - Ještě %1$d další oznámení - Ještě %1$d dalších oznámení - Ještě %1$d dalších oznámení + Ještě %1$d oznámení + Ještě %1$d oznámení + Ještě %1$d oznámení + Ještě %1$d oznámení Zkoušky Žádné nadcházející zkoušky Při načítání zkoušek došlo k chybě - Ještě %1$d další zkouška - Ještě %1$d další zkoušky - Ještě %1$d dalších zkoušek - Ještě %1$d dalších zkoušek + Ještě %1$d zkouška + Ještě %1$d zkoušky + Ještě %1$d zkoušek + Ještě %1$d zkoušek Setkání Žádná nadcházející setkání Při načítání setkání došlo k chybě - Ještě %1$d další setkání - Ještě %1$d další setkání - Ještě %1$d dalších setkání - Ještě %1$d dalších setkání + Ještě %1$d setkání + Ještě %1$d setkání + Ještě %1$d setkání + Ještě %1$d setkání Při načítání dat došlo k chybě Žádné @@ -590,6 +592,7 @@ Ano Ne Uložit + Title Žádné lekce Vybrat motiv diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5f14a425..f86c3076 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -344,6 +344,8 @@ Sie haben %1$d neue konferenz Sie haben %1$d neue konferenzen + Present at conference + Agenda Schulankündigungen Keine schulankündigungen @@ -512,6 +514,7 @@ Ja Nein Speichern + Title Keine Lektionen Thema wählen diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 14f23cd2..cfc6810e 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -402,6 +402,8 @@ Masz %1$d nowych zebrań Masz %1$d nowych zebrań + Obecność na zebraniu + Agenda Ogłoszenia szkolne Brak ogłoszeń szkolnych @@ -516,10 +518,10 @@ Następnie: Później: - jeszcze %1$d dodatkowa lekcja - jeszcze %1$d dodatkowe lekcje - jeszcze %1$d dodatkowych lekcji - jeszcze %1$d dodatkowych lekcji + jeszcze %1$d lekcja + jeszcze %1$d lekcje + jeszcze %1$d lekcji + jeszcze %1$d lekcji do %1$s Brak nadchodzących lekcji @@ -528,10 +530,10 @@ Brak prac domowych do wykonania Wystąpił błąd podczas ładowania zadań domowych - Jeszcze %1$d dodatkowe zadanie domowe - Jeszcze %1$d dodatkowe zadania domowe - Jeszcze %1$d dodatkowych zadań domowych - Jeszcze %1$d dodatkowych zadań domowych + Jeszcze %1$d zadanie domowe + Jeszcze %1$d zadania domowe + Jeszcze %1$d zadań domowych + Jeszcze %1$d zadań domowych do %1$s Ostatnie oceny @@ -541,19 +543,19 @@ Brak aktualnych ogłoszeń Wystąpił błąd podczas ładowania ogłoszeń - Jeszcze %1$d dodatkowe ogłoszenie - Jeszcze %1$d dodatkowe ogłoszenia - Jeszcze %1$d dodatkowych ogłoszeń - Jeszcze %1$d dodatkowych ogłoszeń + Jeszcze %1$d ogłoszenie + Jeszcze %1$d ogłoszenia + Jeszcze %1$d ogłoszeń + Jeszcze %1$d ogłoszeń Sprawdziany Brak nadchodzących sprawdzianów Wystąpił błąd podczas ładowania sprawdzianów - Jeszcze %1$d dodatkowy sprawdzian - Jeszcze %1$d dodatkowe sprawdziany - Jeszcze %1$d dodatkowych sprawdzianów - Jeszcze %1$d dodatkowych sprawdzianów + Jeszcze %1$d sprawdzian + Jeszcze %1$d sprawdziany + Jeszcze %1$d sprawdzianów + Jeszcze %1$d sprawdzianów Zebrania Brak nadchodzących zebrań @@ -562,7 +564,7 @@ Jeszcze %1$d dodatkowe zebranie Jeszcze %1$d dodatkowe zebrania Jeszcze %1$d dodatkowych zebrań - Jeszcze %1$d dodatkowych zebrań + Jeszcze %1$d zebrań Wystąpił błąd podczas ładowania danych Brak @@ -590,6 +592,7 @@ Tak Nie Zapisz + Tytuł Brak lekcji Wybierz motyw diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 09b8a146..4e41088f 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -402,6 +402,8 @@ У вас %1$d новая конференция У вас %1$d новых конференций + Present at conference + Agenda Объявления школ Нет объявлений о школе @@ -590,6 +592,7 @@ Да Нет Сохранить + Title Нет уроков Выбрать тему diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index ad078e33..75a42467 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -402,6 +402,8 @@ Máte %1$d nových stretnutí Máte %1$d nových stretnutí + Present at conference + Agenda Školské oznámenia Žiadne školské oznámenia @@ -516,10 +518,10 @@ Ďalej: Neskôr: - ešte %1$d ďalší lekcia - ešte %1$d ďalšie lekcie - ešte %1$d ďalších lekcií - ešte %1$d ďalších lekcií + ešte %1$d lekcia + ešte %1$d lekcie + ešte %1$d lekcií + ešte %1$d lekcií do %1$s Žiadne nadchádzajúce lekcie @@ -528,10 +530,10 @@ Žiadne domáce úlohy do vykonaná Pri načítaní domácich úloh došlo k chybe - Ešte %1$d ďalšia domáca úloha - Ešte %1$d ďalšie domáce úlohy - Ešte %1$d ďalších domácich úloh - Ešte %1$d ďalších domácich úloh + Ešte %1$d domáca úloha + Ešte %1$d domáce úlohy + Ešte %1$d domácich úloh + Ešte %1$d domácich úloh do %1$s Posledné známky @@ -541,28 +543,28 @@ Žiadne aktuálne oznámenia Pri načítaní oznámení došlo k chybe - Ešte %1$d ďalšie oznámenie - Ešte %1$d ďalšie oznámenia - Ešte %1$d ďalších oznámení - Ešte %1$d ďalších oznámení + Ešte %1$d oznámenie + Ešte %1$d oznámenia + Ešte %1$d oznámení + Ešte %1$d oznámení Skúšky Žiadne nadchádzajúce skúšky Pri načítaní skúšok došlo k chybe - Ešte %1$d ďalšia skúška - Ešte %1$d ďalšie skúšky - Ešte %1$d ďalších skúšok - Ešte %1$d ďalších skúšok + Ešte %1$d skúška + Ešte %1$d skúšky + Ešte %1$d skúšok + Ešte %1$d skúšok Stretnutie Žiadna nadchádzajúce stretnutie Pri načítaní stretnutí došlo k chybe - Ešte %1$d ďalšie stretnutie - Ešte %1$d ďalšie stretnutia - Ešte %1$d ďalších stretnutí - Ešte %1$d ďalších stretnutí + Ešte %1$d stretnutie + Ešte %1$d stretnutia + Ešte %1$d stretnutí + Ešte %1$d stretnutí Pri načítaní dát došlo k chybe Žiadne @@ -590,6 +592,7 @@ Áno Nie Uložiť + Title Žiadne lekcie Vybrať motív diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 41f1c300..51f25881 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -402,6 +402,8 @@ У вас є %1$d нова конференція У вас є %1$d нових конференцій + Present at conference + Agenda Оголошення школи Жодних навчальних оголошень @@ -590,6 +592,7 @@ Так Ні Зберегти + Title Брак уроків Увібрати тему 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 6/7] 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 8e8be8bb..7436ffcd 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 3f8622f8..bead8fb2 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() } } From 9cb4754132e5b787b29d47eabe6c8c7990b3e8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Thu, 16 Sep 2021 12:01:49 +0200 Subject: [PATCH 7/7] Version 1.2.3 --- app/build.gradle | 6 +++--- app/src/main/play/release-notes/pl-PL/default.txt | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7436ffcd..814fce3e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { testApplicationId "io.github.tests.wulkanowy" minSdkVersion 21 targetSdkVersion 30 - versionCode 95 - versionName "1.2.2" + versionCode 96 + versionName "1.2.3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true @@ -157,7 +157,7 @@ ext { } dependencies { - implementation "io.github.wulkanowy:sdk:d74acd3989" + implementation "io.github.wulkanowy:sdk:1.2.3" coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' diff --git a/app/src/main/play/release-notes/pl-PL/default.txt b/app/src/main/play/release-notes/pl-PL/default.txt index 3456c3d0..7de10a26 100644 --- a/app/src/main/play/release-notes/pl-PL/default.txt +++ b/app/src/main/play/release-notes/pl-PL/default.txt @@ -1,8 +1,8 @@ -Wersja 1.2.2 +Wersja 1.2.3 -- naprawiliśmy problem z widocznością zadań w aplikacji gdy widoczne są one na stronie www dziennika (nadal pozostaje błąd z zadaniami widocznymi tylko w oficjalnej aplikacji - czekamy na poprawkę po stronie VULCANa) -- odblokowaliśmy niedzielę w wyborze daty w planie lekcji i innych zakładkach -- przywróciliśmy odnośnik do szczęśliwego numerka w menu Więcej -- naprawiliśmy drobne błędy ze stabilnością i wyglądem +- naprawiliśmy pomieszane imiona nauczycieli z salami w planie lekcji +- dodaliśmy brakujące okienka ze szczegółami na ekranie zebrań +- klikając w kafelek z lekcjami na jutro aplikacja teraz przekierowuje na ekran z planem na jutro +- naprawiliśmy błąd przy wylogowywaniu innego niż bieżący uczeń Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases