mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Enable automatic back pagination and unread indicators by default (#7800)
* Enable automatic back pagination and unread indicators by default We want to test these in the nightlies.
This commit is contained in:
committed by
GitHub
parent
e5606e6162
commit
8c0d23771c
+14
-1
@@ -217,6 +217,10 @@ class RoomListPresenterTest {
|
|||||||
val presenter = createRoomListPresenter(client = client)
|
val presenter = createRoomListPresenter(client = client)
|
||||||
presenter.test {
|
presenter.test {
|
||||||
val initialState = awaitItem()
|
val initialState = awaitItem()
|
||||||
|
|
||||||
|
// Skip intermediate event for loading the value of the `UnreadIndicatorCount` feature flag
|
||||||
|
skipItems(1)
|
||||||
|
|
||||||
val summary = createRoomListRoomSummary()
|
val summary = createRoomListRoomSummary()
|
||||||
initialState.eventSink(RoomListEvent.ShowContextMenu(summary))
|
initialState.eventSink(RoomListEvent.ShowContextMenu(summary))
|
||||||
|
|
||||||
@@ -260,6 +264,10 @@ class RoomListPresenterTest {
|
|||||||
val presenter = createRoomListPresenter(client = client)
|
val presenter = createRoomListPresenter(client = client)
|
||||||
presenter.test {
|
presenter.test {
|
||||||
val initialState = awaitItem()
|
val initialState = awaitItem()
|
||||||
|
|
||||||
|
// Skip intermediate event for loading the value of the `UnreadIndicatorCount` feature flag
|
||||||
|
skipItems(1)
|
||||||
|
|
||||||
val summary = createRoomListRoomSummary()
|
val summary = createRoomListRoomSummary()
|
||||||
initialState.eventSink(RoomListEvent.ShowContextMenu(summary))
|
initialState.eventSink(RoomListEvent.ShowContextMenu(summary))
|
||||||
|
|
||||||
@@ -309,6 +317,10 @@ class RoomListPresenterTest {
|
|||||||
)
|
)
|
||||||
presenter.test {
|
presenter.test {
|
||||||
val initialState = awaitItem()
|
val initialState = awaitItem()
|
||||||
|
|
||||||
|
// Skip intermediate event for loading the value of the `UnreadIndicatorCount` feature flag
|
||||||
|
skipItems(1)
|
||||||
|
|
||||||
eventRecorder.assertEmpty()
|
eventRecorder.assertEmpty()
|
||||||
initialState.eventSink(RoomListEvent.ToggleSearchResults)
|
initialState.eventSink(RoomListEvent.ToggleSearchResults)
|
||||||
eventRecorder.assertSingle(
|
eventRecorder.assertSingle(
|
||||||
@@ -398,6 +410,7 @@ class RoomListPresenterTest {
|
|||||||
client = matrixClient,
|
client = matrixClient,
|
||||||
)
|
)
|
||||||
presenter.test {
|
presenter.test {
|
||||||
|
skipItems(1) // Skip initial state
|
||||||
assertThat(awaitItem().contentState).isInstanceOf(RoomListContentState.Empty::class.java)
|
assertThat(awaitItem().contentState).isInstanceOf(RoomListContentState.Empty::class.java)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -616,7 +629,7 @@ class RoomListPresenterTest {
|
|||||||
)
|
)
|
||||||
presenter.test {
|
presenter.test {
|
||||||
assertThat(announcementService.announcementsToShowFlow().first()).isEmpty()
|
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()
|
val state = awaitItem()
|
||||||
assertThat(state.contentAsRooms().showNewNotificationSoundBanner).isFalse()
|
assertThat(state.contentAsRooms().showNewNotificationSoundBanner).isFalse()
|
||||||
announcementService.emitAnnouncementsToShow(listOf(Announcement.NewNotificationSound))
|
announcementService.emitAnnouncementsToShow(listOf(Announcement.NewNotificationSound))
|
||||||
|
|||||||
+2
-2
@@ -121,14 +121,14 @@ enum class FeatureFlags(
|
|||||||
title = "Automatic back pagination of rooms",
|
title = "Automatic back pagination of rooms",
|
||||||
description = "Allow the app to automatically back paginate in rooms to pre-fetch older messages in background." +
|
description = "Allow the app to automatically back paginate in rooms to pre-fetch older messages in background." +
|
||||||
"\nRequires an app restart to take effect.",
|
"\nRequires an app restart to take effect.",
|
||||||
defaultValue = { false },
|
defaultValue = { true },
|
||||||
isFinished = false,
|
isFinished = false,
|
||||||
),
|
),
|
||||||
UnreadIndicatorCount(
|
UnreadIndicatorCount(
|
||||||
key = "feature.unread_indicator_count",
|
key = "feature.unread_indicator_count",
|
||||||
title = "Unread indicator count",
|
title = "Unread indicator count",
|
||||||
description = "Show the number of unread messages on the unread indicator in the room list.",
|
description = "Show the number of unread messages on the unread indicator in the room list.",
|
||||||
defaultValue = { false },
|
defaultValue = { true },
|
||||||
isFinished = false,
|
isFinished = false,
|
||||||
),
|
),
|
||||||
SendGalleryMessages(
|
SendGalleryMessages(
|
||||||
|
|||||||
Reference in New Issue
Block a user