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:
@@ -70,7 +70,6 @@ class PreferencesFlowNode @AssistedInject constructor(
|
||||
data object AnalyticsSettings : NavTarget
|
||||
|
||||
@Parcelize
|
||||
|
||||
data object About : NavTarget
|
||||
|
||||
@Parcelize
|
||||
|
||||
@@ -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() =
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user