mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 20:01:55 +00:00
Mark as unread: add a feature flag, disabled on release build.
This commit is contained in:
+2
@@ -88,6 +88,7 @@ private fun RoomListModalBottomSheetContent(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
if (contextMenu.markAsUnreadFeatureFlagEnabled) {
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
headlineContent = {
|
||||||
Text(
|
Text(
|
||||||
@@ -118,6 +119,7 @@ private fun RoomListModalBottomSheetContent(
|
|||||||
*/
|
*/
|
||||||
style = ListItemStyle.Primary,
|
style = ListItemStyle.Primary,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
headlineContent = {
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
+4
@@ -111,6 +111,9 @@ class RoomListPresenter @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val markAsUnreadFeatureFlagEnabled by featureFlagService.isFeatureEnabledFlow(FeatureFlags.MarkAsUnread)
|
||||||
|
.collectAsState(initial = null)
|
||||||
|
|
||||||
// Avatar indicator
|
// Avatar indicator
|
||||||
val showAvatarIndicator by indicatorService.showRoomListTopBarIndicator()
|
val showAvatarIndicator by indicatorService.showRoomListTopBarIndicator()
|
||||||
|
|
||||||
@@ -135,6 +138,7 @@ class RoomListPresenter @Inject constructor(
|
|||||||
roomId = event.roomListRoomSummary.roomId,
|
roomId = event.roomListRoomSummary.roomId,
|
||||||
roomName = event.roomListRoomSummary.name,
|
roomName = event.roomListRoomSummary.name,
|
||||||
isDm = event.roomListRoomSummary.isDm,
|
isDm = event.roomListRoomSummary.isDm,
|
||||||
|
markAsUnreadFeatureFlagEnabled = markAsUnreadFeatureFlagEnabled == true,
|
||||||
hasNewContent = event.roomListRoomSummary.hasNewContent
|
hasNewContent = event.roomListRoomSummary.hasNewContent
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -49,6 +49,7 @@ data class RoomListState(
|
|||||||
val roomId: RoomId,
|
val roomId: RoomId,
|
||||||
val roomName: String,
|
val roomName: String,
|
||||||
val isDm: Boolean,
|
val isDm: Boolean,
|
||||||
|
val markAsUnreadFeatureFlagEnabled: Boolean,
|
||||||
val hasNewContent: Boolean,
|
val hasNewContent: Boolean,
|
||||||
) : ContextMenu
|
) : ContextMenu
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -106,5 +106,6 @@ internal fun aContextMenuShown(
|
|||||||
roomId = RoomId("!aRoom:aDomain"),
|
roomId = RoomId("!aRoom:aDomain"),
|
||||||
roomName = roomName,
|
roomName = roomName,
|
||||||
isDm = isDm,
|
isDm = isDm,
|
||||||
|
markAsUnreadFeatureFlagEnabled = true,
|
||||||
hasNewContent = hasNewContent,
|
hasNewContent = hasNewContent,
|
||||||
)
|
)
|
||||||
|
|||||||
+2
@@ -356,6 +356,7 @@ class RoomListPresenterTests {
|
|||||||
roomId = summary.roomId,
|
roomId = summary.roomId,
|
||||||
roomName = summary.name,
|
roomName = summary.name,
|
||||||
isDm = false,
|
isDm = false,
|
||||||
|
markAsUnreadFeatureFlagEnabled = true,
|
||||||
hasNewContent = false,
|
hasNewContent = false,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -382,6 +383,7 @@ class RoomListPresenterTests {
|
|||||||
roomId = summary.roomId,
|
roomId = summary.roomId,
|
||||||
roomName = summary.name,
|
roomName = summary.name,
|
||||||
isDm = false,
|
isDm = false,
|
||||||
|
markAsUnreadFeatureFlagEnabled = true,
|
||||||
hasNewContent = false,
|
hasNewContent = false,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
+7
@@ -75,4 +75,11 @@ enum class FeatureFlags(
|
|||||||
defaultValue = true,
|
defaultValue = true,
|
||||||
isFinished = false,
|
isFinished = false,
|
||||||
),
|
),
|
||||||
|
MarkAsUnread(
|
||||||
|
key = "feature.markAsUnread",
|
||||||
|
title = "Mark as unread",
|
||||||
|
description = "Allow user to mark a room as unread",
|
||||||
|
defaultValue = true,
|
||||||
|
isFinished = false,
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -40,6 +40,7 @@ class StaticFeatureFlagProvider @Inject constructor() :
|
|||||||
FeatureFlags.PinUnlock -> true
|
FeatureFlags.PinUnlock -> true
|
||||||
FeatureFlags.Mentions -> true
|
FeatureFlags.Mentions -> true
|
||||||
FeatureFlags.SecureStorage -> true
|
FeatureFlags.SecureStorage -> true
|
||||||
|
FeatureFlags.MarkAsUnread -> false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
|
|||||||
Reference in New Issue
Block a user