mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[Login] Fix not showing sync fragment.
This commit is contained in:
parent
83e1b21ec3
commit
7ff10df70c
@ -53,6 +53,10 @@ class LoginSyncFragment : Fragment(), CoroutineScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
|
||||||
|
EventBus.getDefault().removeStickyEvent(ApiTaskAllFinishedEvent::class.java)
|
||||||
|
EventBus.getDefault().removeStickyEvent(ApiTaskErrorEvent::class.java)
|
||||||
|
|
||||||
val profiles = activity.profiles.filter { it.isSelected }.map { it.profile }
|
val profiles = activity.profiles.filter { it.isSelected }.map { it.profile }
|
||||||
val loginStores = activity.loginStores.filter { store -> profiles.any { it.loginStoreId == store.id } }
|
val loginStores = activity.loginStores.filter { store -> profiles.any { it.loginStoreId == store.id } }
|
||||||
|
|
||||||
@ -87,6 +91,7 @@ class LoginSyncFragment : Fragment(), CoroutineScope {
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
|
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
|
||||||
fun onSyncFinishedEvent(event: ApiTaskAllFinishedEvent) {
|
fun onSyncFinishedEvent(event: ApiTaskAllFinishedEvent) {
|
||||||
|
EventBus.getDefault().removeStickyEvent(event)
|
||||||
nav.navigate(R.id.loginFinishFragment, finishArguments, activity.navOptions)
|
nav.navigate(R.id.loginFinishFragment, finishArguments, activity.navOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user