diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt index dd54285fb5..123ad2d83e 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt @@ -123,7 +123,6 @@ class HomeActivityViewModel @AssistedInject constructor( if (state.authenticationDescription == null && vectorFeatures.isNewAppLayoutEnabled()) { releaseNotesPreferencesStore.appLayoutOnboardingShown.onEach { isAppLayoutOnboardingShown -> if (!isAppLayoutOnboardingShown) { - releaseNotesPreferencesStore.setAppLayoutOnboardingShown(true) _viewEvents.post(HomeActivityViewEvents.ShowReleaseNotes) } }.launchIn(viewModelScope) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/release/ReleaseNotesActivity.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/release/ReleaseNotesActivity.kt index c5cc55d7bb..4d8cfc9f23 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/release/ReleaseNotesActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/release/ReleaseNotesActivity.kt @@ -16,17 +16,20 @@ package im.vector.app.features.home.room.list.home.release +import androidx.lifecycle.lifecycleScope import dagger.hilt.android.AndroidEntryPoint import im.vector.app.core.extensions.addFragment import im.vector.app.core.platform.ScreenOrientationLocker import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.databinding.ActivitySimpleBinding +import kotlinx.coroutines.launch import javax.inject.Inject @AndroidEntryPoint class ReleaseNotesActivity : VectorBaseActivity() { @Inject lateinit var orientationLocker: ScreenOrientationLocker + @Inject lateinit var releaseNotesPreferencesStore: ReleaseNotesPreferencesStore override fun getBinding() = ActivitySimpleBinding.inflate(layoutInflater) @@ -38,4 +41,11 @@ class ReleaseNotesActivity : VectorBaseActivity() { addFragment(views.simpleFragmentContainer, ReleaseNotesFragment::class.java) } } + + override fun onResume() { + super.onResume() + lifecycleScope.launch { + releaseNotesPreferencesStore.setAppLayoutOnboardingShown(true) + } + } }