Skip to content

build(deps): Bump androidx-navigation from 2.8.9 to 2.9.0 #21862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,15 @@ class BloggingRemindersViewModel @Inject constructor(
}

fun onBottomSheetDismissed() {
when (val screen = selectedScreen.value) {
Screen.PROLOGUE,
Screen.PROLOGUE_SETTINGS,
Screen.NOTIFICATIONS_PERMISSION,
Screen.SELECTION -> analyticsTracker.trackFlowDismissed(screen)
Screen.EPILOGUE -> analyticsTracker.trackFlowCompleted()
null -> Unit // Do nothing
// We need to check nullability this way because of a compile Java type mismatch warning becoming an error
selectedScreen.value?.let {
when (it) {
Screen.PROLOGUE,
Screen.PROLOGUE_SETTINGS,
Screen.NOTIFICATIONS_PERMISSION,
Screen.SELECTION -> analyticsTracker.trackFlowDismissed(it)
Screen.EPILOGUE -> analyticsTracker.trackFlowCompleted()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.wordpress.android.BaseUnitTest
import kotlin.test.assertNull

@ExperimentalCoroutinesApi
class LiveDataUtilsTest : BaseUnitTest() {
Expand All @@ -16,13 +17,13 @@ class LiveDataUtilsTest : BaseUnitTest() {
val mergedSources = mergeNotNull(sourceA, sourceB)
mergedSources.observeForever { }

assertThat(mergedSources.value).isNull()
assertNull(mergedSources.value)
val firstValue = 1
val secondValue = 2
sourceA.value = firstValue
assertThat(mergedSources.value).isEqualTo(firstValue)
assertThat(mergedSources.value ?: -1).isEqualTo(firstValue)
sourceB.value = secondValue
assertThat(mergedSources.value).isEqualTo(secondValue)
assertThat(mergedSources.value ?: -1).isEqualTo(secondValue)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import org.wordpress.android.util.NoDelayCoroutineDispatcher
import org.wordpress.android.util.analytics.AnalyticsTrackerWrapper
import org.wordpress.android.viewmodel.main.WPMainActivityViewModel.FocusPointInfo
import java.util.Date
import kotlin.test.assertNotNull

@Suppress("LargeClass")
@InternalCoroutinesApi
Expand Down Expand Up @@ -311,7 +312,9 @@ class WPMainActivityViewModelTest : BaseUnitTest() {
val promptId = 123

action!!.onClickAction?.invoke(promptId, BloggingPromptAttribution.BLOGANUARY)
assertThat(viewModel.createPostWithBloggingPrompt.value).isEqualTo(promptId)
val createPostWithBloggingPromptValue = viewModel.createPostWithBloggingPrompt.value
assertNotNull(createPostWithBloggingPromptValue)
assertThat(createPostWithBloggingPromptValue).isEqualTo(promptId)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ class PageParentViewModelTest : BaseUnitTest() {
viewModel.start(site, 1L)
val newParent = viewModel.pages.value?.first { (it as? ParentPage)?.id == newParentId } as ParentPage

assertThat(viewModel.isSaveButtonVisible.value).isFalse
assertThat(viewModel.isSaveButtonVisible.value ?: true).isFalse

viewModel.onParentSelected(newParent)

assertThat(viewModel.isSaveButtonVisible.value).isTrue
assertThat(viewModel.isSaveButtonVisible.value ?: false).isTrue
}

@Test
Expand All @@ -144,10 +144,10 @@ class PageParentViewModelTest : BaseUnitTest() {
val newParent = viewModel.pages.value?.first { (it as? ParentPage)?.id == newParentId } as ParentPage

viewModel.onParentSelected(newParent)
assertThat(viewModel.isSaveButtonVisible.value).isTrue
assertThat(viewModel.isSaveButtonVisible.value ?: false).isTrue

viewModel.onParentSelected(initialParent)
assertThat(viewModel.isSaveButtonVisible.value).isFalse
assertThat(viewModel.isSaveButtonVisible.value ?: true).isFalse
}

private suspend fun mockPageStoreGetPages() {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ androidx-credentials = '1.2.0'
androidx-exifinterface = '1.4.1'
androidx-fragment = '1.8.6'
androidx-lifecycle = '2.8.7'
androidx-navigation = '2.8.9'
androidx-navigation = '2.9.0'
androidx-paging = '2.1.2'
androidx-percentlayout = '1.0.0'
androidx-preference = '1.2.1'
Expand Down