1
0
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:
Rafał Borcz 2019-03-22 23:54:58 +01:00 committed by Mikołaj Pich
parent 4b78862486
commit 36785f019a
3 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ class GradePresenter @Inject constructor(
}
fun onPageSelected(index: Int) {
loadChild(index)
if (semesters.isNotEmpty()) loadChild(index)
}
fun onSwipeRefresh() {

View File

@ -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?) {

View File

@ -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)