mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[Login] Fix not showing errors after one successful login.
This commit is contained in:
parent
f72a6103b5
commit
45c2948ed1
@ -59,6 +59,8 @@ class LoginProgressFragment : Fragment(), CoroutineScope {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
if (!isAdded) return
|
||||
|
||||
EventBus.getDefault().removeStickyEvent(FirstLoginFinishedEvent::class.java)
|
||||
|
||||
val args = arguments ?: run {
|
||||
activity.error(ApiError(TAG, LOGIN_NO_ARGUMENTS))
|
||||
nav.navigateUp()
|
||||
@ -93,6 +95,7 @@ class LoginProgressFragment : Fragment(), CoroutineScope {
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
|
||||
fun onFirstLoginFinishedEvent(event: FirstLoginFinishedEvent) {
|
||||
EventBus.getDefault().removeStickyEvent(event)
|
||||
if (event.profileList.isEmpty()) {
|
||||
MaterialAlertDialogBuilder(activity)
|
||||
.setTitle(R.string.login_account_no_students)
|
||||
|
Loading…
Reference in New Issue
Block a user