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:
parent
50211a49bc
commit
827dd35791
5 changed files with 4 additions and 7 deletions
|
|
@ -70,7 +70,6 @@ class PreferencesFlowNode @AssistedInject constructor(
|
||||||
data object AnalyticsSettings : NavTarget
|
data object AnalyticsSettings : NavTarget
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
|
|
||||||
data object About : NavTarget
|
data object About : NavTarget
|
||||||
|
|
||||||
@Parcelize
|
@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.matrix.api.room.RoomNotificationMode
|
||||||
import io.element.android.libraries.theme.ElementTheme
|
import io.element.android.libraries.theme.ElementTheme
|
||||||
import io.element.android.libraries.ui.strings.CommonStrings
|
import io.element.android.libraries.ui.strings.CommonStrings
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun NotificationSettingsView(
|
fun NotificationSettingsView(
|
||||||
state: NotificationSettingsState,
|
state: NotificationSettingsState,
|
||||||
|
|
@ -166,7 +167,6 @@ private fun NotificationSettingsContentView(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun getTitleForRoomNotificationMode(mode: RoomNotificationMode?) =
|
private fun getTitleForRoomNotificationMode(mode: RoomNotificationMode?) =
|
||||||
when(mode) {
|
when(mode) {
|
||||||
|
|
@ -246,7 +246,6 @@ private fun ContentToPreview(state: NotificationSettingsState) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
internal fun InvalidNotificationSettingsViewightPreview() =
|
internal fun InvalidNotificationSettingsViewightPreview() =
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,7 @@ enum class FeatureFlags(
|
||||||
NotificationSettings(
|
NotificationSettings(
|
||||||
key = "feature.notificationsettings",
|
key = "feature.notificationsettings",
|
||||||
title = "Show notification settings",
|
title = "Show notification settings",
|
||||||
// Do not forget to edit StaticFeatureFlagProvider when enabling the feature.
|
defaultValue = true,
|
||||||
defaultValue = false,
|
|
||||||
),
|
),
|
||||||
RichTextEditor(
|
RichTextEditor(
|
||||||
key = "feature.richtexteditor",
|
key = "feature.richtexteditor",
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class StaticFeatureFlagProvider @Inject constructor() :
|
||||||
when(feature) {
|
when(feature) {
|
||||||
FeatureFlags.LocationSharing -> true
|
FeatureFlags.LocationSharing -> true
|
||||||
FeatureFlags.Polls -> true
|
FeatureFlags.Polls -> true
|
||||||
FeatureFlags.NotificationSettings -> false
|
FeatureFlags.NotificationSettings -> true
|
||||||
FeatureFlags.RichTextEditor -> true
|
FeatureFlags.RichTextEditor -> true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ interface MatrixRoom : Closeable {
|
||||||
* A one-to-one is a room with exactly 2 members.
|
* 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).
|
* 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.
|
* The current loaded members as a StateFlow.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue