Fix spotless

Change-Id: I7dcd7fa9544c873edeb8270f8d89b3bcb7211428
dt/nav-safe-args-android-dependency
Don Turner 8 months ago
parent 2d45b84031
commit 924391cd22

@ -41,6 +41,7 @@ import com.google.samples.apps.nowinandroid.feature.topic.navigation.topicScreen
import kotlinx.serialization.Serializable
@Serializable object TopicPlaceholderDestination
@Serializable object DetailPaneNavHostDestination
fun NavGraphBuilder.interestsListDetailScreen() {
@ -92,7 +93,7 @@ internal fun InterestsListDetailScreen(
NavHost(
navController = nestedNavController,
startDestination = TopicPlaceholderDestination::class,
route = DetailPaneNavHostDestination::class
route = DetailPaneNavHostDestination::class,
) {
topicScreen(
showBackButton = !listDetailNavigator.isListPaneVisible(),

@ -36,4 +36,3 @@ fun NavGraphBuilder.bookmarksScreen(
BookmarksRoute(onTopicClick, onShowSnackbar)
}
}

@ -27,6 +27,7 @@ import kotlinx.serialization.Serializable
const val LINKED_NEWS_RESOURCE_ID = "linkedNewsResourceId"
private const val DEEP_LINK_URI_PATTERN =
"https://www.nowinandroid.apps.samples.google.com/foryou/{$LINKED_NEWS_RESOURCE_ID}"
@Serializable data class ForYouDestination(val linkedNewsResourceId: String? = null)
fun NavController.navigateToForYou(navOptions: NavOptions) = navigate(route = ForYouDestination(), navOptions)
@ -35,7 +36,7 @@ fun NavGraphBuilder.forYouScreen(onTopicClick: (String) -> Unit) {
composable<ForYouDestination>(
deepLinks = listOf(
navDeepLink { uriPattern = DEEP_LINK_URI_PATTERN },
)
),
) {
ForYouRoute(onTopicClick)
}

@ -25,7 +25,6 @@ import com.google.samples.apps.nowinandroid.core.domain.GetFollowableTopicsUseCa
import com.google.samples.apps.nowinandroid.core.domain.TopicSortField
import com.google.samples.apps.nowinandroid.core.model.data.FollowableTopic
import com.google.samples.apps.nowinandroid.feature.interests.navigation.InterestsDestination
import com.google.samples.apps.nowinandroid.feature.interests.navigation.TOPIC_ID_ARG
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow

@ -20,7 +20,6 @@ import androidx.navigation.NavController
import androidx.navigation.NavOptions
import kotlinx.serialization.Serializable
const val TOPIC_ID_ARG = "topicId"
@Serializable data class InterestsDestination(val topicId: String?)

@ -25,7 +25,6 @@ import com.google.samples.apps.nowinandroid.core.testing.repository.TestUserData
import com.google.samples.apps.nowinandroid.core.testing.util.MainDispatcherRule
import com.google.samples.apps.nowinandroid.feature.interests.InterestsUiState
import com.google.samples.apps.nowinandroid.feature.interests.InterestsViewModel
import com.google.samples.apps.nowinandroid.feature.interests.navigation.TOPIC_ID_ARG
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.UnconfinedTestDispatcher

Loading…
Cancel
Save