Enabled NotificationSettings by default, Fix spacing, use activeMemberCount for isOneToOne.

- Enabled Notification Settings by default
- Fix spacing
- Use activeMemberCount for isOneToOne
This commit is contained in:
David Langley
2023-09-13 14:18:28 +01:00
parent 50211a49bc
commit 827dd35791
5 changed files with 4 additions and 7 deletions

View File

@@ -70,7 +70,6 @@ class PreferencesFlowNode @AssistedInject constructor(
data object AnalyticsSettings : NavTarget
@Parcelize
data object About : NavTarget
@Parcelize

View File

@@ -54,6 +54,7 @@ import io.element.android.libraries.designsystem.utils.OnLifecycleEvent
import io.element.android.libraries.matrix.api.room.RoomNotificationMode
import io.element.android.libraries.theme.ElementTheme
import io.element.android.libraries.ui.strings.CommonStrings
@Composable
fun NotificationSettingsView(
state: NotificationSettingsState,
@@ -166,7 +167,6 @@ private fun NotificationSettingsContentView(
}
}
@Composable
private fun getTitleForRoomNotificationMode(mode: RoomNotificationMode?) =
when(mode) {
@@ -246,7 +246,6 @@ private fun ContentToPreview(state: NotificationSettingsState) {
)
}
@Preview
@Composable
internal fun InvalidNotificationSettingsViewightPreview() =

View File

@@ -41,8 +41,7 @@ enum class FeatureFlags(
NotificationSettings(
key = "feature.notificationsettings",
title = "Show notification settings",
// Do not forget to edit StaticFeatureFlagProvider when enabling the feature.
defaultValue = false,
defaultValue = true,
),
RichTextEditor(
key = "feature.richtexteditor",

View File

@@ -34,7 +34,7 @@ class StaticFeatureFlagProvider @Inject constructor() :
when(feature) {
FeatureFlags.LocationSharing -> true
FeatureFlags.Polls -> true
FeatureFlags.NotificationSettings -> false
FeatureFlags.NotificationSettings -> true
FeatureFlags.RichTextEditor -> true
}
} else {

View File

@@ -53,7 +53,7 @@ interface MatrixRoom : Closeable {
* A one-to-one is a room with exactly 2 members.
* See [the Matrix spec](https://spec.matrix.org/latest/client-server-api/#default-underride-rules).
*/
val isOneToOne: Boolean get() = joinedMemberCount == 2L
val isOneToOne: Boolean get() = activeMemberCount == 2L
/**
* The current loaded members as a StateFlow.