mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-23 22:56:23 -06:00
Fix restoring the grade fragment (#293)
This commit is contained in:
parent
4b78862486
commit
36785f019a
@ -77,7 +77,7 @@ class GradePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onPageSelected(index: Int) {
|
||||
loadChild(index)
|
||||
if (semesters.isNotEmpty()) loadChild(index)
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
|
@ -2,6 +2,8 @@ package io.github.wulkanowy.ui.modules.main
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
@ -165,7 +167,7 @@ class MainActivity : BaseActivity(), MainView {
|
||||
|
||||
override fun openLoginView() {
|
||||
startActivity(LoginActivity.getStartIntent(this)
|
||||
.apply { addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK) })
|
||||
.apply { addFlags(FLAG_ACTIVITY_CLEAR_TASK or FLAG_ACTIVITY_NEW_TASK) })
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle?) {
|
||||
|
@ -5,7 +5,6 @@ import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
import io.github.wulkanowy.R
|
||||
import io.github.wulkanowy.di.scopes.PerActivity
|
||||
import io.github.wulkanowy.di.scopes.PerFragment
|
||||
import io.github.wulkanowy.ui.modules.about.AboutFragment
|
||||
import io.github.wulkanowy.ui.modules.about.AboutModule
|
||||
@ -33,7 +32,6 @@ abstract class MainModule {
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
@PerActivity
|
||||
@Provides
|
||||
fun provideFragNavController(activity: MainActivity): FragNavController {
|
||||
return FragNavController(activity.supportFragmentManager, R.id.mainFragmentContainer)
|
||||
|
Loading…
Reference in New Issue
Block a user