Remove FeatureFlag.MediaGallery
This commit is contained in:
parent
3a14fcdc0d
commit
a0629d03fd
5 changed files with 3 additions and 20 deletions
|
|
@ -86,10 +86,6 @@ class RoomDetailsPresenter @Inject constructor(
|
||||||
|
|
||||||
val pinnedMessagesCount by remember { derivedStateOf { roomInfo.pinnedEventIds.size } }
|
val pinnedMessagesCount by remember { derivedStateOf { roomInfo.pinnedEventIds.size } }
|
||||||
|
|
||||||
val canShowMediaGallery by remember {
|
|
||||||
featureFlagService.isFeatureEnabledFlow(FeatureFlags.MediaGallery)
|
|
||||||
}.collectAsState(false)
|
|
||||||
|
|
||||||
LaunchedEffect(Unit) {
|
LaunchedEffect(Unit) {
|
||||||
room.updateRoomNotificationSettings()
|
room.updateRoomNotificationSettings()
|
||||||
observeNotificationSettings()
|
observeNotificationSettings()
|
||||||
|
|
@ -198,7 +194,6 @@ class RoomDetailsPresenter @Inject constructor(
|
||||||
displayRolesAndPermissionsSettings = !isDm && isUserAdmin,
|
displayRolesAndPermissionsSettings = !isDm && isUserAdmin,
|
||||||
isPublic = joinRule == JoinRule.Public,
|
isPublic = joinRule == JoinRule.Public,
|
||||||
heroes = roomInfo.heroes.toPersistentList(),
|
heroes = roomInfo.heroes.toPersistentList(),
|
||||||
canShowMediaGallery = canShowMediaGallery,
|
|
||||||
pinnedMessagesCount = pinnedMessagesCount,
|
pinnedMessagesCount = pinnedMessagesCount,
|
||||||
snackbarMessage = snackbarMessage,
|
snackbarMessage = snackbarMessage,
|
||||||
canShowKnockRequests = canShowKnockRequests,
|
canShowKnockRequests = canShowKnockRequests,
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ data class RoomDetailsState(
|
||||||
val displayRolesAndPermissionsSettings: Boolean,
|
val displayRolesAndPermissionsSettings: Boolean,
|
||||||
val isPublic: Boolean,
|
val isPublic: Boolean,
|
||||||
val heroes: ImmutableList<MatrixUser>,
|
val heroes: ImmutableList<MatrixUser>,
|
||||||
val canShowMediaGallery: Boolean,
|
|
||||||
val pinnedMessagesCount: Int?,
|
val pinnedMessagesCount: Int?,
|
||||||
val snackbarMessage: SnackbarMessage?,
|
val snackbarMessage: SnackbarMessage?,
|
||||||
val canShowKnockRequests: Boolean,
|
val canShowKnockRequests: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ fun aRoomDetailsState(
|
||||||
displayAdminSettings: Boolean = false,
|
displayAdminSettings: Boolean = false,
|
||||||
isPublic: Boolean = true,
|
isPublic: Boolean = true,
|
||||||
heroes: List<MatrixUser> = emptyList(),
|
heroes: List<MatrixUser> = emptyList(),
|
||||||
canShowMediaGallery: Boolean = true,
|
|
||||||
pinnedMessagesCount: Int? = null,
|
pinnedMessagesCount: Int? = null,
|
||||||
snackbarMessage: SnackbarMessage? = null,
|
snackbarMessage: SnackbarMessage? = null,
|
||||||
canShowKnockRequests: Boolean = false,
|
canShowKnockRequests: Boolean = false,
|
||||||
|
|
@ -139,7 +138,6 @@ fun aRoomDetailsState(
|
||||||
displayRolesAndPermissionsSettings = displayAdminSettings,
|
displayRolesAndPermissionsSettings = displayAdminSettings,
|
||||||
isPublic = isPublic,
|
isPublic = isPublic,
|
||||||
heroes = heroes.toPersistentList(),
|
heroes = heroes.toPersistentList(),
|
||||||
canShowMediaGallery = canShowMediaGallery,
|
|
||||||
pinnedMessagesCount = pinnedMessagesCount,
|
pinnedMessagesCount = pinnedMessagesCount,
|
||||||
snackbarMessage = snackbarMessage,
|
snackbarMessage = snackbarMessage,
|
||||||
canShowKnockRequests = canShowKnockRequests,
|
canShowKnockRequests = canShowKnockRequests,
|
||||||
|
|
|
||||||
|
|
@ -244,11 +244,9 @@ fun RoomDetailsView(
|
||||||
PollsItem(
|
PollsItem(
|
||||||
openPollHistory = openPollHistory
|
openPollHistory = openPollHistory
|
||||||
)
|
)
|
||||||
if (state.canShowMediaGallery) {
|
MediaGalleryItem(
|
||||||
MediaGalleryItem(
|
onClick = openMediaGallery
|
||||||
onClick = openMediaGallery
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.roomType is RoomDetailsType.Dm && state.roomMemberDetailsState != null) {
|
if (state.roomType is RoomDetailsType.Dm && state.roomMemberDetailsState != null) {
|
||||||
|
|
|
||||||
|
|
@ -96,13 +96,6 @@ enum class FeatureFlags(
|
||||||
defaultValue = { true },
|
defaultValue = { true },
|
||||||
isFinished = false,
|
isFinished = false,
|
||||||
),
|
),
|
||||||
MediaGallery(
|
|
||||||
key = "feature.media_gallery",
|
|
||||||
title = "Allow user to open the media gallery",
|
|
||||||
description = null,
|
|
||||||
defaultValue = { true },
|
|
||||||
isFinished = false,
|
|
||||||
),
|
|
||||||
PrintLogsToLogcat(
|
PrintLogsToLogcat(
|
||||||
key = "feature.print_logs_to_logcat",
|
key = "feature.print_logs_to_logcat",
|
||||||
title = "Print logs to logcat",
|
title = "Print logs to logcat",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue