diff --git a/features/home/impl/src/test/kotlin/io/element/android/features/home/impl/roomlist/RoomListPresenterTest.kt b/features/home/impl/src/test/kotlin/io/element/android/features/home/impl/roomlist/RoomListPresenterTest.kt index 5245a164d1..332493641e 100644 --- a/features/home/impl/src/test/kotlin/io/element/android/features/home/impl/roomlist/RoomListPresenterTest.kt +++ b/features/home/impl/src/test/kotlin/io/element/android/features/home/impl/roomlist/RoomListPresenterTest.kt @@ -217,6 +217,10 @@ class RoomListPresenterTest { val presenter = createRoomListPresenter(client = client) presenter.test { val initialState = awaitItem() + + // Skip intermediate event for loading the value of the `UnreadIndicatorCount` feature flag + skipItems(1) + val summary = createRoomListRoomSummary() initialState.eventSink(RoomListEvent.ShowContextMenu(summary)) @@ -260,6 +264,10 @@ class RoomListPresenterTest { val presenter = createRoomListPresenter(client = client) presenter.test { val initialState = awaitItem() + + // Skip intermediate event for loading the value of the `UnreadIndicatorCount` feature flag + skipItems(1) + val summary = createRoomListRoomSummary() initialState.eventSink(RoomListEvent.ShowContextMenu(summary)) @@ -309,6 +317,10 @@ class RoomListPresenterTest { ) presenter.test { val initialState = awaitItem() + + // Skip intermediate event for loading the value of the `UnreadIndicatorCount` feature flag + skipItems(1) + eventRecorder.assertEmpty() initialState.eventSink(RoomListEvent.ToggleSearchResults) eventRecorder.assertSingle( @@ -398,6 +410,7 @@ class RoomListPresenterTest { client = matrixClient, ) presenter.test { + skipItems(1) // Skip initial state assertThat(awaitItem().contentState).isInstanceOf(RoomListContentState.Empty::class.java) } } @@ -616,7 +629,7 @@ class RoomListPresenterTest { ) presenter.test { assertThat(announcementService.announcementsToShowFlow().first()).isEmpty() - skipItems(1) + skipItems(2) // Skip initial state and intermediate event for loading the value of the `UnreadIndicatorCount` feature flag val state = awaitItem() assertThat(state.contentAsRooms().showNewNotificationSoundBanner).isFalse() announcementService.emitAnnouncementsToShow(listOf(Announcement.NewNotificationSound)) diff --git a/libraries/featureflag/api/src/main/kotlin/io/element/android/libraries/featureflag/api/FeatureFlags.kt b/libraries/featureflag/api/src/main/kotlin/io/element/android/libraries/featureflag/api/FeatureFlags.kt index 1b7aad30b3..fb1ce0be69 100644 --- a/libraries/featureflag/api/src/main/kotlin/io/element/android/libraries/featureflag/api/FeatureFlags.kt +++ b/libraries/featureflag/api/src/main/kotlin/io/element/android/libraries/featureflag/api/FeatureFlags.kt @@ -121,14 +121,14 @@ enum class FeatureFlags( title = "Automatic back pagination of rooms", description = "Allow the app to automatically back paginate in rooms to pre-fetch older messages in background." + "\nRequires an app restart to take effect.", - defaultValue = { false }, + defaultValue = { true }, isFinished = false, ), UnreadIndicatorCount( key = "feature.unread_indicator_count", title = "Unread indicator count", description = "Show the number of unread messages on the unread indicator in the room list.", - defaultValue = { false }, + defaultValue = { true }, isFinished = false, ), SendGalleryMessages(