Rename following to interests

Change-Id: Iabcb8b495717e0cb3a993ecc0e09e3338fe5140f
pull/2/head
Simona Stojanovic 3 years ago committed by Don Turner
parent 2b26ccf260
commit dc4af7e6f7

@ -61,7 +61,7 @@ android {
} }
dependencies { dependencies {
implementation(project(":feature-following")) implementation(project(":feature-interests"))
implementation(project(":feature-foryou")) implementation(project(":feature-foryou"))
implementation(project(":feature-topic")) implementation(project(":feature-topic"))

@ -183,7 +183,7 @@ class NavigationTest {
} }
@Test @Test
fun navigationBar_multipleBackStackFollowing() { fun navigationBar_multipleBackStackInterests() {
composeTestRule.apply { composeTestRule.apply {
onNodeWithText(interests).performClick() onNodeWithText(interests).performClick()
onNodeWithText("Android Studio").performClick() // TODO: Grab string from fake data onNodeWithText("Android Studio").performClick() // TODO: Grab string from fake data
@ -191,7 +191,7 @@ class NavigationTest {
// Switch tab // Switch tab
onNodeWithText(forYou).performClick() onNodeWithText(forYou).performClick()
// Come back to Following // Come back to Interests
onNodeWithText(interests).performClick() onNodeWithText(interests).performClick()
// Verify we're not in the list of interests // Verify we're not in the list of interests

@ -6494,55 +6494,55 @@ HSPLcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt$NiaTheme$1;->invo
HSPLcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt;-><clinit>()V
HSPLcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt;->NiaTheme(ZZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V HSPLcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt;->NiaTheme(ZZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
HSPLcom/google/samples/apps/nowinandroid/core/ui/theme/TypeKt;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/core/ui/theme/TypeKt;-><clinit>()V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowButton$1$1;-><init>(Lkotlin/jvm/functions/Function2;IZ)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$FollowButton$1$1;-><init>(Lkotlin/jvm/functions/Function2;IZ)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowButton$2;-><init>(Z)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$FollowButton$2;-><init>(Z)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowButton$2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$FollowButton$2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingRoute$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsRoute$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingRoute$2;-><init>(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel;II)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsRoute$2;-><init>(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel;II)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingRoute$2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsRoute$2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingScreen$1$1$1;-><init>(Lkotlin/jvm/functions/Function0;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsScreen$1$1$1;-><init>(Lkotlin/jvm/functions/Function0;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingScreen$2;-><init>(Lcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;II)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsScreen$2;-><init>(Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;II)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingTopicCard$1$1$1;-><init>(Lkotlin/jvm/functions/Function0;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsTopicCard$1$1$1;-><init>(Lkotlin/jvm/functions/Function0;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingWithTopicsScreen$1$1$1;-><init>(Lcom/google/samples/apps/nowinandroid/core/model/data/Topic;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;I)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsWithTopicsScreen$1$1$1;-><init>(Lcom/google/samples/apps/nowinandroid/core/model/data/Topic;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;I)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingWithTopicsScreen$1$1$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsWithTopicsScreen$1$1$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingWithTopicsScreen$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState$Topics;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;I)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsWithTopicsScreen$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState$Topics;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;I)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingWithTopicsScreen$1;->invoke(Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsWithTopicsScreen$1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$TopicIcon$1$1;-><init>(Lkotlin/jvm/functions/Function0;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$TopicIcon$1$1;-><init>(Lkotlin/jvm/functions/Function0;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$TopicIcon$2;-><init>(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;II)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$TopicIcon$2;-><init>(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;II)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt;->FollowButton(IZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;->FollowButton(IZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt;->FollowingRoute(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel;Landroidx/compose/runtime/Composer;II)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;->InterestsRoute(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel;Landroidx/compose/runtime/Composer;II)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt;->FollowingScreen(Lcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;II)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;->InterestsScreen(Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;II)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt;->FollowingTopicCard(Lcom/google/samples/apps/nowinandroid/core/model/data/Topic;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;->InterestsTopicCard(Lcom/google/samples/apps/nowinandroid/core/model/data/Topic;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt;->FollowingWithTopicsScreen(Landroidx/compose/ui/Modifier;Lcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState$Topics;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;->InterestsWithTopicsScreen(Landroidx/compose/ui/Modifier;Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState$Topics;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt;->TopicDescription(Ljava/lang/String;Landroidx/compose/runtime/Composer;I)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;->TopicDescription(Ljava/lang/String;Landroidx/compose/runtime/Composer;I)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt;->TopicIcon(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;II)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;->TopicIcon(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;II)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt;->TopicTitle(Ljava/lang/String;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;II)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;->TopicTitle(Ljava/lang/String;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;II)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingState$Topics;-><init>(Ljava/util/Set;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsState$Topics;-><init>(Ljava/util/Set;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState$Loading;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState$Loading;-><clinit>()V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState$Loading;-><init>()V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState$Loading;-><init>()V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState$Topics;-><init>(Ljava/util/List;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState$Topics;-><init>(Ljava/util/List;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState$Topics;->equals(Ljava/lang/Object;)Z HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState$Topics;->equals(Ljava/lang/Object;)Z
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$followedTopicIdsStream$1;-><init>(Lkotlin/coroutines/Continuation;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$followedTopicIdsStream$1;-><init>(Lkotlin/coroutines/Continuation;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2;Lkotlin/coroutines/Continuation;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2;Lkotlin/coroutines/Continuation;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2;-><init>(Lkotlinx/coroutines/flow/FlowCollector;Ljava/util/List;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2;-><init>(Lkotlinx/coroutines/flow/FlowCollector;Ljava/util/List;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2;->emit(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2;->emit(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1;-><init>(Lcom/google/samples/apps/nowinandroid/core/datastore/NiaPreferences$special$$inlined$map$1;Ljava/util/List;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1;-><init>(Lcom/google/samples/apps/nowinandroid/core/datastore/NiaPreferences$special$$inlined$map$1;Ljava/util/List;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$lambda-4$$inlined$sortedBy$1;-><init>()V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$lambda-4$$inlined$sortedBy$1;-><init>()V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$lambda-4$$inlined$sortedBy$1;->compare(Ljava/lang/Object;Ljava/lang/Object;)I HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$lambda-4$$inlined$sortedBy$1;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$flatMapLatest$1;-><init>(Lkotlin/coroutines/Continuation;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$flatMapLatest$1;-><init>(Lkotlin/coroutines/Continuation;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$flatMapLatest$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$flatMapLatest$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$flatMapLatest$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$flatMapLatest$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1$2$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1$2;Lkotlin/coroutines/Continuation;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1$2$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1$2;Lkotlin/coroutines/Continuation;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1$2$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1$2$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1$2;-><init>(Lkotlinx/coroutines/flow/FlowCollector;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1$2;-><init>(Lkotlinx/coroutines/flow/FlowCollector;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1$2;->emit(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1$2;->emit(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1;-><init>(Lkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1;-><init>(Lkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$uiState$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel;Lkotlin/coroutines/Continuation;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$uiState$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel;Lkotlin/coroutines/Continuation;)V
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$uiState$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$uiState$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$uiState$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$uiState$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
HSPLcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel;-><init>(Lcom/google/samples/apps/nowinandroid/core/domain/repository/FakeTopicsRepository;)V HSPLcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel;-><init>(Lcom/google/samples/apps/nowinandroid/core/domain/repository/FakeTopicsRepository;)V
HSPLcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt$lambda-1$1;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt$lambda-1$1;-><clinit>()V
HSPLcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt$lambda-1$1;-><init>()V HSPLcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt$lambda-1$1;-><init>()V
HSPLcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt$lambda-1$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; HSPLcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt$lambda-1$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
@ -6613,8 +6613,8 @@ HSPLcom/google/samples/apps/nowinandroid/ui/ComposableSingletons$NiaAppKt$lambda
HSPLcom/google/samples/apps/nowinandroid/ui/ComposableSingletons$NiaAppKt;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/ui/ComposableSingletons$NiaAppKt;-><clinit>()V
HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Episodes;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Episodes;-><clinit>()V
HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Episodes;-><init>()V HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Episodes;-><init>()V
HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Following;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Interests;-><clinit>()V
HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Following;-><init>()V HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Interests;-><init>()V
HSPLcom/google/samples/apps/nowinandroid/ui/Destination$ForYou;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/ui/Destination$ForYou;-><clinit>()V
HSPLcom/google/samples/apps/nowinandroid/ui/Destination$ForYou;-><init>()V HSPLcom/google/samples/apps/nowinandroid/ui/Destination$ForYou;-><init>()V
HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Saved;-><clinit>()V HSPLcom/google/samples/apps/nowinandroid/ui/Destination$Saved;-><clinit>()V
@ -8383,7 +8383,7 @@ HSPLkotlinx/coroutines/flow/FlowKt__DistinctKt$defaultKeySelector$1;-><clinit>()
HSPLkotlinx/coroutines/flow/FlowKt__DistinctKt$defaultKeySelector$1;-><init>()V HSPLkotlinx/coroutines/flow/FlowKt__DistinctKt$defaultKeySelector$1;-><init>()V
HSPLkotlinx/coroutines/flow/FlowKt__DistinctKt$defaultKeySelector$1;->invoke(Ljava/lang/Object;)Ljava/lang/Object; HSPLkotlinx/coroutines/flow/FlowKt__DistinctKt$defaultKeySelector$1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1$1;-><init>(Lkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1;Lkotlin/coroutines/Continuation;)V HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1$1;-><init>(Lkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1;Lkotlin/coroutines/Continuation;)V
HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1;-><init>(Lcom/google/samples/apps/nowinandroid/core/datastore/NiaPreferences$special$$inlined$map$1;Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$followedTopicIdsStream$1;)V HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1;-><init>(Lcom/google/samples/apps/nowinandroid/core/datastore/NiaPreferences$special$$inlined$map$1;Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$followedTopicIdsStream$1;)V
HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catchImpl$1;-><init>(Lkotlin/coroutines/Continuation;)V HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catchImpl$1;-><init>(Lkotlin/coroutines/Continuation;)V
HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catchImpl$2$emit$1;-><init>(Lkotlinx/coroutines/flow/FlowKt__ErrorsKt$catchImpl$2;Lkotlin/coroutines/Continuation;)V HSPLkotlinx/coroutines/flow/FlowKt__ErrorsKt$catchImpl$2$emit$1;-><init>(Lkotlinx/coroutines/flow/FlowKt__ErrorsKt$catchImpl$2;Lkotlin/coroutines/Continuation;)V
@ -8421,7 +8421,7 @@ HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt_
HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1;-><init>([Lkotlinx/coroutines/flow/Flow;Lcom/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModel$uiState$2;)V HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1;-><init>([Lkotlinx/coroutines/flow/Flow;Lcom/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModel$uiState$2;)V
HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$unsafeFlow$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1;Lkotlinx/coroutines/flow/Flow;Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$uiState$1;)V HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$unsafeFlow$1;-><init>(Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1;Lkotlinx/coroutines/flow/Flow;Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$uiState$1;)V
HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$unsafeFlow$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$unsafeFlow$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$1$1;-><init>(Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)V HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$1$1;-><init>(Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)V
HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$1$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; HSPLkotlinx/coroutines/flow/FlowKt__ZipKt$combine$1$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
@ -11105,34 +11105,34 @@ Lcom/google/samples/apps/nowinandroid/core/ui/theme/ColorKt;
Lcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt$NiaTheme$1; Lcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt$NiaTheme$1;
Lcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt; Lcom/google/samples/apps/nowinandroid/core/ui/theme/ThemeKt;
Lcom/google/samples/apps/nowinandroid/core/ui/theme/TypeKt; Lcom/google/samples/apps/nowinandroid/core/ui/theme/TypeKt;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowButton$1$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$FollowButton$1$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowButton$2; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$FollowButton$2;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingRoute$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsRoute$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingRoute$2; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsRoute$2;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingScreen$1$1$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsScreen$1$1$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingScreen$2; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsScreen$2;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingTopicCard$1$1$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsTopicCard$1$1$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingTopicCard$2; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsTopicCard$2;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingWithTopicsScreen$1$1$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsWithTopicsScreen$1$1$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$FollowingWithTopicsScreen$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$InterestsWithTopicsScreen$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$TopicIcon$1$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$TopicIcon$1$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt$TopicIcon$2; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt$TopicIcon$2;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingScreenKt; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsScreenKt;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingState$Topics; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsState$Topics;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState$Loading; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState$Loading;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState$Topics; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState$Topics;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingUiState; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsUiState;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$followedTopicIdsStream$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$followedTopicIdsStream$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1$2;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$$inlined$map$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$mapFollowedAndUnfollowedTopics$lambda-4$$inlined$sortedBy$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$mapFollowedAndUnfollowedTopics$lambda-4$$inlined$sortedBy$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$flatMapLatest$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$flatMapLatest$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1$2$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1$2$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1$2; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1$2;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$special$$inlined$map$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$special$$inlined$map$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel$uiState$1; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel$uiState$1;
Lcom/google/samples/apps/nowinandroid/feature/following/FollowingViewModel; Lcom/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel;
Lcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt$lambda-1$1; Lcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt$lambda-1$1;
Lcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt; Lcom/google/samples/apps/nowinandroid/feature/foryou/ComposableSingletons$ForYouScreenKt;
Lcom/google/samples/apps/nowinandroid/feature/foryou/FollowedTopicsState$FollowedTopics; Lcom/google/samples/apps/nowinandroid/feature/foryou/FollowedTopicsState$FollowedTopics;
@ -11176,7 +11176,7 @@ Lcom/google/samples/apps/nowinandroid/ui/ComposableSingletons$NiaAppKt$lambda-1$
Lcom/google/samples/apps/nowinandroid/ui/ComposableSingletons$NiaAppKt$lambda-1$1; Lcom/google/samples/apps/nowinandroid/ui/ComposableSingletons$NiaAppKt$lambda-1$1;
Lcom/google/samples/apps/nowinandroid/ui/ComposableSingletons$NiaAppKt; Lcom/google/samples/apps/nowinandroid/ui/ComposableSingletons$NiaAppKt;
Lcom/google/samples/apps/nowinandroid/ui/Destination$Episodes; Lcom/google/samples/apps/nowinandroid/ui/Destination$Episodes;
Lcom/google/samples/apps/nowinandroid/ui/Destination$Following; Lcom/google/samples/apps/nowinandroid/ui/Destination$Interests;
Lcom/google/samples/apps/nowinandroid/ui/Destination$ForYou; Lcom/google/samples/apps/nowinandroid/ui/Destination$ForYou;
Lcom/google/samples/apps/nowinandroid/ui/Destination$Saved; Lcom/google/samples/apps/nowinandroid/ui/Destination$Saved;
Lcom/google/samples/apps/nowinandroid/ui/Destination; Lcom/google/samples/apps/nowinandroid/ui/Destination;

@ -220,8 +220,8 @@ private sealed class Destination(
iconTextId = R.string.saved iconTextId = R.string.saved
) )
object Following : Destination( object Interests : Destination(
route = NiaDestinations.FOLLOWING_ROUTE, route = NiaDestinations.INTERESTS_ROUTE,
selectedIcon = Icons.Filled.Grid3x3, selectedIcon = Icons.Filled.Grid3x3,
unselectedIcon = Icons.Outlined.Grid3x3, unselectedIcon = Icons.Outlined.Grid3x3,
iconTextId = R.string.interests iconTextId = R.string.interests
@ -231,5 +231,5 @@ private sealed class Destination(
private val TOP_LEVEL_DESTINATIONS = listOf( private val TOP_LEVEL_DESTINATIONS = listOf(
Destination.ForYou, Destination.ForYou,
// TODO: Add destinations here, see b/226359180. // TODO: Add destinations here, see b/226359180.
Destination.Following Destination.Interests
) )

@ -27,8 +27,8 @@ import androidx.navigation.compose.composable
import androidx.navigation.compose.navigation import androidx.navigation.compose.navigation
import androidx.navigation.compose.rememberNavController import androidx.navigation.compose.rememberNavController
import androidx.navigation.navArgument import androidx.navigation.navArgument
import com.google.samples.apps.nowinandroid.feature.following.InterestsRoute
import com.google.samples.apps.nowinandroid.feature.foryou.ForYouRoute import com.google.samples.apps.nowinandroid.feature.foryou.ForYouRoute
import com.google.samples.apps.nowinandroid.feature.interests.InterestsRoute
import com.google.samples.apps.nowinandroid.feature.topic.InterestsDestinations import com.google.samples.apps.nowinandroid.feature.topic.InterestsDestinations
import com.google.samples.apps.nowinandroid.feature.topic.InterestsScreens.TOPIC_SCREEN import com.google.samples.apps.nowinandroid.feature.topic.InterestsScreens.TOPIC_SCREEN
import com.google.samples.apps.nowinandroid.feature.topic.TopicDestinationsArgs import com.google.samples.apps.nowinandroid.feature.topic.TopicDestinationsArgs
@ -63,10 +63,10 @@ fun NiaNavGraph(
Text("SAVED") Text("SAVED")
} }
navigation( navigation(
startDestination = InterestsDestinations.INTERESTS_ROUTE, startDestination = InterestsDestinations.INTERESTS_DESTINATION,
route = NiaDestinations.FOLLOWING_ROUTE route = NiaDestinations.INTERESTS_ROUTE
) { ) {
composable(InterestsDestinations.INTERESTS_ROUTE) { composable(InterestsDestinations.INTERESTS_DESTINATION) {
InterestsRoute( InterestsRoute(
navigateToTopic = { navController.navigate("$TOPIC_SCREEN/$it") }, navigateToTopic = { navController.navigate("$TOPIC_SCREEN/$it") },
navigateToAuthor = { /* TO IMPLEMENT */ }, navigateToAuthor = { /* TO IMPLEMENT */ },

@ -28,7 +28,7 @@ object NiaDestinations {
const val FOR_YOU_ROUTE = "for_you" const val FOR_YOU_ROUTE = "for_you"
const val EPISODES_ROUTE = "episodes" const val EPISODES_ROUTE = "episodes"
const val SAVED_ROUTE = "saved" const val SAVED_ROUTE = "saved"
const val FOLLOWING_ROUTE = "following" const val INTERESTS_ROUTE = "interests"
} }
/** /**

@ -40,7 +40,7 @@ class BaselineProfileGenerator {
// through your most important UI. // through your most important UI.
startActivityAndWait() startActivityAndWait()
device.waitForIdle() device.waitForIdle()
listOf("Episodes", "Saved", "Following").forEach { listOf("Episodes", "Saved", "Interests").forEach {
device.run { device.run {
findObject(By.text(it)) findObject(By.text(it))
.click() .click()

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.samples.apps.nowinandroid.following package com.google.samples.apps.nowinandroid.interests
import androidx.activity.ComponentActivity import androidx.activity.ComponentActivity
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -29,10 +29,10 @@ import com.google.samples.apps.nowinandroid.core.model.data.Author
import com.google.samples.apps.nowinandroid.core.model.data.FollowableAuthor import com.google.samples.apps.nowinandroid.core.model.data.FollowableAuthor
import com.google.samples.apps.nowinandroid.core.model.data.FollowableTopic import com.google.samples.apps.nowinandroid.core.model.data.FollowableTopic
import com.google.samples.apps.nowinandroid.core.model.data.Topic import com.google.samples.apps.nowinandroid.core.model.data.Topic
import com.google.samples.apps.nowinandroid.feature.following.FollowingScreen import com.google.samples.apps.nowinandroid.feature.interests.InterestsScreen
import com.google.samples.apps.nowinandroid.feature.following.FollowingTabState import com.google.samples.apps.nowinandroid.feature.interests.InterestsTabState
import com.google.samples.apps.nowinandroid.feature.following.FollowingUiState import com.google.samples.apps.nowinandroid.feature.interests.InterestsUiState
import com.google.samples.apps.nowinandroid.feature.following.R import com.google.samples.apps.nowinandroid.feature.interests.R
import org.junit.Before import org.junit.Before
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
@ -47,19 +47,19 @@ class InterestsScreenTest {
@get:Rule @get:Rule
val composeTestRule = createAndroidComposeRule<ComponentActivity>() val composeTestRule = createAndroidComposeRule<ComponentActivity>()
private lateinit var followingLoading: String private lateinit var interestsLoading: String
private lateinit var followingEmptyHeader: String private lateinit var interestsEmptyHeader: String
private lateinit var followingTopicCardFollowButton: String private lateinit var interestsTopicCardFollowButton: String
private lateinit var followingTopicCardUnfollowButton: String private lateinit var interestsTopicCardUnfollowButton: String
@Before @Before
fun setup() { fun setup() {
composeTestRule.activity.apply { composeTestRule.activity.apply {
followingLoading = getString(R.string.following_loading) interestsLoading = getString(R.string.interests_loading)
followingEmptyHeader = getString(R.string.following_empty_header) interestsEmptyHeader = getString(R.string.interests_empty_header)
followingTopicCardFollowButton = interestsTopicCardFollowButton =
getString(R.string.interests_card_follow_button_content_desc) getString(R.string.interests_card_follow_button_content_desc)
followingTopicCardUnfollowButton = interestsTopicCardUnfollowButton =
getString(R.string.interests_card_unfollow_button_content_desc) getString(R.string.interests_card_unfollow_button_content_desc)
} }
} }
@ -67,22 +67,22 @@ class InterestsScreenTest {
@Test @Test
fun niaLoadingWheel_inTopics_whenScreenIsLoading_showLoading() { fun niaLoadingWheel_inTopics_whenScreenIsLoading_showLoading() {
composeTestRule.setContent { composeTestRule.setContent {
InterestsScreen(uiState = FollowingUiState.Loading, tabIndex = 0) InterestsScreen(uiState = InterestsUiState.Loading, tabIndex = 0)
} }
composeTestRule composeTestRule
.onNodeWithContentDescription(followingLoading) .onNodeWithContentDescription(interestsLoading)
.assertExists() .assertExists()
} }
@Test @Test
fun niaLoadingWheel_inAuthors_whenScreenIsLoading_showLoading() { fun niaLoadingWheel_inAuthors_whenScreenIsLoading_showLoading() {
composeTestRule.setContent { composeTestRule.setContent {
InterestsScreen(uiState = FollowingUiState.Loading, tabIndex = 1) InterestsScreen(uiState = InterestsUiState.Loading, tabIndex = 1)
} }
composeTestRule composeTestRule
.onNodeWithContentDescription(followingLoading) .onNodeWithContentDescription(interestsLoading)
.assertExists() .assertExists()
} }
@ -90,7 +90,7 @@ class InterestsScreenTest {
fun interestsWithTopics_whenTopicsFollowed_showFollowedAndUnfollowedTopicsWithInfo() { fun interestsWithTopics_whenTopicsFollowed_showFollowedAndUnfollowedTopicsWithInfo() {
composeTestRule.setContent { composeTestRule.setContent {
InterestsScreen( InterestsScreen(
uiState = FollowingUiState.Interests(topics = testTopics, authors = listOf()), uiState = InterestsUiState.Interests(topics = testTopics, authors = listOf()),
tabIndex = 0 tabIndex = 0
) )
} }
@ -110,11 +110,11 @@ class InterestsScreenTest {
.assertCountEquals(testTopics.count()) .assertCountEquals(testTopics.count())
composeTestRule composeTestRule
.onAllNodesWithContentDescription(followingTopicCardFollowButton) .onAllNodesWithContentDescription(interestsTopicCardFollowButton)
.assertCountEquals(numberOfUnfollowedTopics) .assertCountEquals(numberOfUnfollowedTopics)
composeTestRule composeTestRule
.onAllNodesWithContentDescription(followingTopicCardUnfollowButton) .onAllNodesWithContentDescription(interestsTopicCardUnfollowButton)
.assertCountEquals(testAuthors.filter { it.isFollowed }.size) .assertCountEquals(testAuthors.filter { it.isFollowed }.size)
} }
@ -122,7 +122,7 @@ class InterestsScreenTest {
fun interestsWithTopics_whenAuthorsFollowed_showFollowedAndUnfollowedTopicsWithInfo() { fun interestsWithTopics_whenAuthorsFollowed_showFollowedAndUnfollowedTopicsWithInfo() {
composeTestRule.setContent { composeTestRule.setContent {
InterestsScreen( InterestsScreen(
uiState = FollowingUiState.Interests(topics = listOf(), authors = testAuthors), uiState = InterestsUiState.Interests(topics = listOf(), authors = testAuthors),
tabIndex = 1 tabIndex = 1
) )
} }
@ -138,42 +138,42 @@ class InterestsScreenTest {
.assertIsDisplayed() .assertIsDisplayed()
composeTestRule composeTestRule
.onAllNodesWithContentDescription(followingTopicCardFollowButton) .onAllNodesWithContentDescription(interestsTopicCardFollowButton)
.assertCountEquals(numberOfUnfollowedAuthors) .assertCountEquals(numberOfUnfollowedAuthors)
composeTestRule composeTestRule
.onAllNodesWithContentDescription(followingTopicCardUnfollowButton) .onAllNodesWithContentDescription(interestsTopicCardUnfollowButton)
.assertCountEquals(testTopics.filter { it.isFollowed }.size) .assertCountEquals(testTopics.filter { it.isFollowed }.size)
} }
@Test @Test
fun topicsEmpty_whenDataIsEmptyOccurs_thenShowEmptyScreen() { fun topicsEmpty_whenDataIsEmptyOccurs_thenShowEmptyScreen() {
composeTestRule.setContent { composeTestRule.setContent {
InterestsScreen(uiState = FollowingUiState.Empty, tabIndex = 0) InterestsScreen(uiState = InterestsUiState.Empty, tabIndex = 0)
} }
composeTestRule composeTestRule
.onNodeWithText(followingEmptyHeader) .onNodeWithText(interestsEmptyHeader)
.assertIsDisplayed() .assertIsDisplayed()
} }
@Test @Test
fun authorsEmpty_whenDataIsEmptyOccurs_thenShowEmptyScreen() { fun authorsEmpty_whenDataIsEmptyOccurs_thenShowEmptyScreen() {
composeTestRule.setContent { composeTestRule.setContent {
InterestsScreen(uiState = FollowingUiState.Empty, tabIndex = 1) InterestsScreen(uiState = InterestsUiState.Empty, tabIndex = 1)
} }
composeTestRule composeTestRule
.onNodeWithText(followingEmptyHeader) .onNodeWithText(interestsEmptyHeader)
.assertIsDisplayed() .assertIsDisplayed()
} }
@Composable @Composable
private fun InterestsScreen(uiState: FollowingUiState, tabIndex: Int = 0) { private fun InterestsScreen(uiState: InterestsUiState, tabIndex: Int = 0) {
FollowingScreen( InterestsScreen(
uiState = uiState, uiState = uiState,
tabState = FollowingTabState( tabState = InterestsTabState(
titles = listOf(R.string.following_topics, R.string.following_people), titles = listOf(R.string.interests_topics, R.string.interests_people),
currentIndex = tabIndex currentIndex = tabIndex
), ),
followAuthor = { _, _ -> }, followAuthor = { _, _ -> },

@ -15,6 +15,6 @@
limitations under the License. limitations under the License.
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.samples.apps.nowinandroid.feature.following"> package="com.google.samples.apps.nowinandroid.feature.interests">
</manifest> </manifest>

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.samples.apps.nowinandroid.feature.following package com.google.samples.apps.nowinandroid.feature.interests
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
@ -40,10 +40,10 @@ import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage import coil.compose.AsyncImage
import com.google.samples.apps.nowinandroid.core.ui.FollowButton import com.google.samples.apps.nowinandroid.core.ui.FollowButton
import com.google.samples.apps.nowinandroid.core.ui.theme.NiaTheme import com.google.samples.apps.nowinandroid.core.ui.theme.NiaTheme
import com.google.samples.apps.nowinandroid.feature.following.R.string import com.google.samples.apps.nowinandroid.feature.interests.R.string
@Composable @Composable
fun FollowingItem( fun InterestsItem(
name: String, name: String,
following: Boolean, following: Boolean,
topicImageUrl: String, topicImageUrl: String,
@ -65,7 +65,7 @@ fun FollowingItem(
.clickable { onClick() } .clickable { onClick() }
.padding(vertical = itemSeparation) .padding(vertical = itemSeparation)
) { ) {
FollowingIcon(topicImageUrl, iconModifier.size(64.dp)) InterestsIcon(topicImageUrl, iconModifier.size(64.dp))
Spacer(modifier = Modifier.width(16.dp)) Spacer(modifier = Modifier.width(16.dp))
InterestContent(name, description) InterestContent(name, description)
} }
@ -102,7 +102,7 @@ private fun InterestContent(name: String, description: String, modifier: Modifie
} }
@Composable @Composable
private fun FollowingIcon(topicImageUrl: String, modifier: Modifier = Modifier) { private fun InterestsIcon(topicImageUrl: String, modifier: Modifier = Modifier) {
if (topicImageUrl.isEmpty()) { if (topicImageUrl.isEmpty()) {
Icon( Icon(
imageVector = Filled.Android, imageVector = Filled.Android,
@ -121,10 +121,10 @@ private fun FollowingIcon(topicImageUrl: String, modifier: Modifier = Modifier)
@Preview @Preview
@Composable @Composable
private fun FollowingCardPreview() { private fun InterestsCardPreview() {
NiaTheme { NiaTheme {
Surface { Surface {
FollowingItem( InterestsItem(
name = "Compose", name = "Compose",
description = "Description", description = "Description",
following = false, following = false,
@ -138,10 +138,10 @@ private fun FollowingCardPreview() {
@Preview @Preview
@Composable @Composable
private fun FollowingCardLongNamePreview() { private fun InterestsCardLongNamePreview() {
NiaTheme { NiaTheme {
Surface { Surface {
FollowingItem( InterestsItem(
name = "This is a very very very very long name", name = "This is a very very very very long name",
description = "Description", description = "Description",
following = true, following = true,
@ -155,10 +155,10 @@ private fun FollowingCardLongNamePreview() {
@Preview @Preview
@Composable @Composable
private fun FollowingCardLongDescriptionPreview() { private fun InterestsCardLongDescriptionPreview() {
NiaTheme { NiaTheme {
Surface { Surface {
FollowingItem( InterestsItem(
name = "Compose", name = "Compose",
description = "This is a very very very very very very very " + description = "This is a very very very very very very very " +
"very very very long description", "very very very long description",
@ -173,10 +173,10 @@ private fun FollowingCardLongDescriptionPreview() {
@Preview @Preview
@Composable @Composable
private fun FollowingCardWithEmptyDescriptionPreview() { private fun InterestsCardWithEmptyDescriptionPreview() {
NiaTheme { NiaTheme {
Surface { Surface {
FollowingItem( InterestsItem(
name = "Compose", name = "Compose",
description = "", description = "",
following = true, following = true,

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.samples.apps.nowinandroid.feature.following package com.google.samples.apps.nowinandroid.feature.interests
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
@ -46,12 +46,12 @@ fun InterestsRoute(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
navigateToAuthor: () -> Unit, navigateToAuthor: () -> Unit,
navigateToTopic: (String) -> Unit, navigateToTopic: (String) -> Unit,
viewModel: FollowingViewModel = hiltViewModel() viewModel: InterestsViewModel = hiltViewModel()
) { ) {
val uiState by viewModel.uiState.collectAsState() val uiState by viewModel.uiState.collectAsState()
val tabState by viewModel.tabState.collectAsState() val tabState by viewModel.tabState.collectAsState()
FollowingScreen( InterestsScreen(
uiState = uiState, uiState = uiState,
tabState = tabState, tabState = tabState,
followTopic = viewModel::followTopic, followTopic = viewModel::followTopic,
@ -64,9 +64,9 @@ fun InterestsRoute(
} }
@Composable @Composable
fun FollowingScreen( fun InterestsScreen(
uiState: FollowingUiState, uiState: InterestsUiState,
tabState: FollowingTabState, tabState: InterestsTabState,
followAuthor: (String, Boolean) -> Unit, followAuthor: (String, Boolean) -> Unit,
followTopic: (String, Boolean) -> Unit, followTopic: (String, Boolean) -> Unit,
navigateToAuthor: () -> Unit, navigateToAuthor: () -> Unit,
@ -98,26 +98,26 @@ fun FollowingScreen(
) )
) )
when (uiState) { when (uiState) {
FollowingUiState.Loading -> InterestsUiState.Loading ->
LoadingWheel( LoadingWheel(
modifier = modifier, modifier = modifier,
contentDesc = stringResource(id = R.string.following_loading), contentDesc = stringResource(id = R.string.interests_loading),
) )
is FollowingUiState.Interests -> is InterestsUiState.Interests ->
FollowingContent( InterestsContent(
tabState, switchTab, uiState, navigateToTopic, followTopic, tabState, switchTab, uiState, navigateToTopic, followTopic,
navigateToAuthor, followAuthor navigateToAuthor, followAuthor
) )
is FollowingUiState.Empty -> InterestsEmptyScreen() is InterestsUiState.Empty -> InterestsEmptyScreen()
} }
} }
} }
@Composable @Composable
private fun FollowingContent( private fun InterestsContent(
tabState: FollowingTabState, tabState: InterestsTabState,
switchTab: (Int) -> Unit, switchTab: (Int) -> Unit,
uiState: FollowingUiState.Interests, uiState: InterestsUiState.Interests,
navigateToTopic: (String) -> Unit, navigateToTopic: (String) -> Unit,
followTopic: (String, Boolean) -> Unit, followTopic: (String, Boolean) -> Unit,
navigateToAuthor: () -> Unit, navigateToAuthor: () -> Unit,
@ -157,5 +157,5 @@ private fun FollowingContent(
@Composable @Composable
private fun InterestsEmptyScreen() { private fun InterestsEmptyScreen() {
Text(text = stringResource(id = R.string.following_empty_header)) Text(text = stringResource(id = R.string.interests_empty_header))
} }

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.samples.apps.nowinandroid.feature.following package com.google.samples.apps.nowinandroid.feature.interests
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
@ -34,27 +34,27 @@ import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@HiltViewModel @HiltViewModel
class FollowingViewModel @Inject constructor( class InterestsViewModel @Inject constructor(
private val authorsRepository: AuthorsRepository, private val authorsRepository: AuthorsRepository,
private val topicsRepository: TopicsRepository private val topicsRepository: TopicsRepository
) : ViewModel() { ) : ViewModel() {
private val _tabState = MutableStateFlow( private val _tabState = MutableStateFlow(
FollowingTabState( InterestsTabState(
titles = listOf(R.string.following_topics, R.string.following_people), titles = listOf(R.string.interests_topics, R.string.interests_people),
currentIndex = 0 currentIndex = 0
) )
) )
val tabState: StateFlow<FollowingTabState> = _tabState.asStateFlow() val tabState: StateFlow<InterestsTabState> = _tabState.asStateFlow()
val uiState: StateFlow<FollowingUiState> = combine( val uiState: StateFlow<InterestsUiState> = combine(
authorsRepository.getAuthorsStream(), authorsRepository.getAuthorsStream(),
authorsRepository.getFollowedAuthorIdsStream(), authorsRepository.getFollowedAuthorIdsStream(),
topicsRepository.getTopicsStream(), topicsRepository.getTopicsStream(),
topicsRepository.getFollowedTopicIdsStream(), topicsRepository.getFollowedTopicIdsStream(),
) { availableAuthors, followedAuthorIdsState, availableTopics, followedTopicIdsState -> ) { availableAuthors, followedAuthorIdsState, availableTopics, followedTopicIdsState ->
FollowingUiState.Interests( InterestsUiState.Interests(
authors = availableAuthors authors = availableAuthors
.map { author -> .map { author ->
FollowableAuthor( FollowableAuthor(
@ -76,7 +76,7 @@ class FollowingViewModel @Inject constructor(
.stateIn( .stateIn(
scope = viewModelScope, scope = viewModelScope,
started = SharingStarted.WhileSubscribed(5_000), started = SharingStarted.WhileSubscribed(5_000),
initialValue = FollowingUiState.Loading initialValue = InterestsUiState.Loading
) )
fun followTopic(followedTopicId: String, followed: Boolean) { fun followTopic(followedTopicId: String, followed: Boolean) {
@ -100,18 +100,18 @@ class FollowingViewModel @Inject constructor(
} }
} }
data class FollowingTabState( data class InterestsTabState(
val titles: List<Int>, val titles: List<Int>,
val currentIndex: Int val currentIndex: Int
) )
sealed interface FollowingUiState { sealed interface InterestsUiState {
object Loading : FollowingUiState object Loading : InterestsUiState
data class Interests( data class Interests(
val authors: List<FollowableAuthor>, val authors: List<FollowableAuthor>,
val topics: List<FollowableTopic> val topics: List<FollowableTopic>
) : FollowingUiState ) : InterestsUiState
object Empty : FollowingUiState object Empty : InterestsUiState
} }

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.samples.apps.nowinandroid.feature.following package com.google.samples.apps.nowinandroid.feature.interests
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.WindowInsets
@ -44,7 +44,7 @@ fun TopicsTabContent(
) { ) {
topics.forEach { followableTopic -> topics.forEach { followableTopic ->
item { item {
FollowingItem( InterestsItem(
name = followableTopic.topic.name, name = followableTopic.topic.name,
following = followableTopic.isFollowed, following = followableTopic.isFollowed,
description = followableTopic.topic.shortDescription, description = followableTopic.topic.shortDescription,
@ -79,7 +79,7 @@ fun AuthorsTabContent(
) { ) {
authors.forEach { followableTopic -> authors.forEach { followableTopic ->
item { item {
FollowingItem( InterestsItem(
name = followableTopic.author.name, name = followableTopic.author.name,
following = followableTopic.isFollowed, following = followableTopic.isFollowed,
topicImageUrl = followableTopic.author.imageUrl, topicImageUrl = followableTopic.author.imageUrl,

@ -16,10 +16,10 @@
--> -->
<resources> <resources>
<string name="interests">Interests</string> <string name="interests">Interests</string>
<string name="following_topics">Topics</string> <string name="interests_topics">Topics</string>
<string name="following_people">People</string> <string name="interests_people">People</string>
<string name="following_loading">Loading data</string> <string name="interests_loading">Loading data</string>
<string name="following_empty_header">"No available data"</string> <string name="interests_empty_header">"No available data"</string>
<string name="interests_card_follow_button_content_desc">Follow interest button</string> <string name="interests_card_follow_button_content_desc">Follow interest button</string>
<string name="interests_card_unfollow_button_content_desc">Unfollow interest button</string> <string name="interests_card_unfollow_button_content_desc">Unfollow interest button</string>
<string name="top_app_bar_action_button_content_desc">Menu</string> <string name="top_app_bar_action_button_content_desc">Menu</string>

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.samples.apps.nowinandroid.following package com.google.samples.apps.nowinandroid.interests
import app.cash.turbine.test import app.cash.turbine.test
import com.google.samples.apps.nowinandroid.core.model.data.Author import com.google.samples.apps.nowinandroid.core.model.data.Author
@ -24,32 +24,32 @@ import com.google.samples.apps.nowinandroid.core.model.data.Topic
import com.google.samples.apps.nowinandroid.core.testing.repository.TestAuthorsRepository import com.google.samples.apps.nowinandroid.core.testing.repository.TestAuthorsRepository
import com.google.samples.apps.nowinandroid.core.testing.repository.TestTopicsRepository import com.google.samples.apps.nowinandroid.core.testing.repository.TestTopicsRepository
import com.google.samples.apps.nowinandroid.core.testing.util.TestDispatcherRule import com.google.samples.apps.nowinandroid.core.testing.util.TestDispatcherRule
import com.google.samples.apps.nowinandroid.feature.following.FollowingUiState import com.google.samples.apps.nowinandroid.feature.interests.InterestsUiState
import com.google.samples.apps.nowinandroid.feature.following.FollowingViewModel import com.google.samples.apps.nowinandroid.feature.interests.InterestsViewModel
import kotlinx.coroutines.test.runTest import kotlinx.coroutines.test.runTest
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Before import org.junit.Before
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
class FollowingViewModelTest { class InterestsViewModelTest {
@get:Rule @get:Rule
val dispatcherRule = TestDispatcherRule() val dispatcherRule = TestDispatcherRule()
private val authorsRepository = TestAuthorsRepository() private val authorsRepository = TestAuthorsRepository()
private val topicsRepository = TestTopicsRepository() private val topicsRepository = TestTopicsRepository()
private lateinit var viewModel: FollowingViewModel private lateinit var viewModel: InterestsViewModel
@Before @Before
fun setup() { fun setup() {
viewModel = FollowingViewModel(authorsRepository, topicsRepository) viewModel = InterestsViewModel(authorsRepository, topicsRepository)
} }
@Test @Test
fun uiState_whenInitialized_thenShowLoading() = runTest { fun uiState_whenInitialized_thenShowLoading() = runTest {
viewModel.uiState.test { viewModel.uiState.test {
assertEquals(FollowingUiState.Loading, awaitItem()) assertEquals(InterestsUiState.Loading, awaitItem())
cancel() cancel()
} }
} }
@ -57,7 +57,7 @@ class FollowingViewModelTest {
@Test @Test
fun uiState_whenFollowedTopicsAreLoading_thenShowLoading() = runTest { fun uiState_whenFollowedTopicsAreLoading_thenShowLoading() = runTest {
viewModel.uiState.test { viewModel.uiState.test {
assertEquals(FollowingUiState.Loading, awaitItem()) assertEquals(InterestsUiState.Loading, awaitItem())
authorsRepository.setFollowedAuthorIds(setOf("1")) authorsRepository.setFollowedAuthorIds(setOf("1"))
topicsRepository.setFollowedTopicIds(emptySet()) topicsRepository.setFollowedTopicIds(emptySet())
cancel() cancel()
@ -67,7 +67,7 @@ class FollowingViewModelTest {
@Test @Test
fun uiState_whenFollowedAuthorsAreLoading_thenShowLoading() = runTest { fun uiState_whenFollowedAuthorsAreLoading_thenShowLoading() = runTest {
viewModel.uiState.test { viewModel.uiState.test {
assertEquals(FollowingUiState.Loading, awaitItem()) assertEquals(InterestsUiState.Loading, awaitItem())
authorsRepository.setFollowedAuthorIds(emptySet()) authorsRepository.setFollowedAuthorIds(emptySet())
topicsRepository.setFollowedTopicIds(setOf("1")) topicsRepository.setFollowedTopicIds(setOf("1"))
cancel() cancel()
@ -87,7 +87,7 @@ class FollowingViewModelTest {
assertEquals( assertEquals(
false, false,
(awaitItem() as FollowingUiState.Interests) (awaitItem() as InterestsUiState.Interests)
.topics.first { it.topic.id == toggleTopicId }.isFollowed .topics.first { it.topic.id == toggleTopicId }.isFollowed
) )
@ -97,7 +97,7 @@ class FollowingViewModelTest {
) )
assertEquals( assertEquals(
FollowingUiState.Interests(topics = testOutputTopics, authors = emptyList()), InterestsUiState.Interests(topics = testOutputTopics, authors = emptyList()),
awaitItem() awaitItem()
) )
cancel() cancel()
@ -121,7 +121,7 @@ class FollowingViewModelTest {
) )
assertEquals( assertEquals(
FollowingUiState.Interests(topics = emptyList(), authors = testOutputAuthors), InterestsUiState.Interests(topics = emptyList(), authors = testOutputAuthors),
awaitItem() awaitItem()
) )
cancel() cancel()
@ -143,7 +143,7 @@ class FollowingViewModelTest {
assertEquals( assertEquals(
true, true,
(awaitItem() as FollowingUiState.Interests) (awaitItem() as InterestsUiState.Interests)
.topics.first { it.topic.id == toggleTopicId }.isFollowed .topics.first { it.topic.id == toggleTopicId }.isFollowed
) )
@ -153,7 +153,7 @@ class FollowingViewModelTest {
) )
assertEquals( assertEquals(
FollowingUiState.Interests(topics = testInputTopics, authors = emptyList()), InterestsUiState.Interests(topics = testInputTopics, authors = emptyList()),
awaitItem() awaitItem()
) )
cancel() cancel()
@ -179,7 +179,7 @@ class FollowingViewModelTest {
) )
assertEquals( assertEquals(
FollowingUiState.Interests(topics = emptyList(), authors = testInputAuthors), InterestsUiState.Interests(topics = emptyList(), authors = testInputAuthors),
awaitItem() awaitItem()
) )
cancel() cancel()

@ -20,7 +20,7 @@ import com.google.samples.apps.nowinandroid.feature.topic.InterestsScreens.TOPIC
import com.google.samples.apps.nowinandroid.feature.topic.TopicDestinationsArgs.TOPIC_ID_ARG import com.google.samples.apps.nowinandroid.feature.topic.TopicDestinationsArgs.TOPIC_ID_ARG
object InterestsDestinations { object InterestsDestinations {
const val INTERESTS_ROUTE = "interests" const val INTERESTS_DESTINATION = "interests_destination"
const val TOPIC_ROUTE = "$TOPIC_SCREEN/{$TOPIC_ID_ARG}" const val TOPIC_ROUTE = "$TOPIC_SCREEN/{$TOPIC_ID_ARG}"
} }

@ -53,7 +53,7 @@ include(":core-model")
include(":core-network") include(":core-network")
include(":core-ui") include(":core-ui")
include(":core-testing") include(":core-testing")
include(":feature-following")
include(":feature-foryou") include(":feature-foryou")
include(":feature-interests")
include(":feature-topic") include(":feature-topic")
include(":sync") include(":sync")

Loading…
Cancel
Save