Merge branch 'develop' into feature/bma/settingUpAccount
This commit is contained in:
commit
f80eece489
100 changed files with 317 additions and 359 deletions
|
|
@ -63,10 +63,10 @@ class ConfigureRoomFlowNode @AssistedInject constructor(
|
|||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
object Root : NavTarget
|
||||
data object Root : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object ConfigureRoom : NavTarget
|
||||
data object ConfigureRoom : NavTarget
|
||||
}
|
||||
|
||||
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ class CreateRoomFlowNode @AssistedInject constructor(
|
|||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
object Root : NavTarget
|
||||
data object Root : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object NewRoom : NavTarget
|
||||
data object NewRoom : NavTarget
|
||||
}
|
||||
|
||||
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@ sealed interface ConfigureRoomEvents {
|
|||
data class RemoveFromSelection(val matrixUser: MatrixUser) : ConfigureRoomEvents
|
||||
data class CreateRoom(val config: CreateRoomConfig) : ConfigureRoomEvents
|
||||
data class HandleAvatarAction(val action: AvatarAction) : ConfigureRoomEvents
|
||||
object CancelCreateRoom : ConfigureRoomEvents
|
||||
data object CancelCreateRoom : ConfigureRoomEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ import io.element.android.libraries.matrix.api.user.MatrixUser
|
|||
|
||||
sealed interface CreateRoomRootEvents {
|
||||
data class StartDM(val matrixUser: MatrixUser) : CreateRoomRootEvents
|
||||
object CancelStartDM : CreateRoomRootEvents
|
||||
data object CancelStartDM : CreateRoomRootEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,16 +71,16 @@ class FtueFlowNode @AssistedInject constructor(
|
|||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
object Placeholder : NavTarget
|
||||
data object Placeholder : NavTarget
|
||||
|
||||
@Parcelize
|
||||
data object MigrationScreen : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object WelcomeScreen : NavTarget
|
||||
data object WelcomeScreen : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object AnalyticsOptIn : NavTarget
|
||||
data object AnalyticsOptIn : NavTarget
|
||||
}
|
||||
|
||||
private val callback = plugins.filterIsInstance<FtueEntryPoint.Callback>().firstOrNull()
|
||||
|
|
|
|||
|
|
@ -103,6 +103,6 @@ class DefaultFtueState @Inject constructor(
|
|||
|
||||
sealed interface FtueStep {
|
||||
data object MigrationScreen : FtueStep
|
||||
object WelcomeScreen : FtueStep
|
||||
object AnalyticsOptIn : FtueStep
|
||||
data object WelcomeScreen : FtueStep
|
||||
data object AnalyticsOptIn : FtueStep
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,14 +19,12 @@ package io.element.android.features.invitelist.impl
|
|||
import io.element.android.features.invitelist.impl.model.InviteListInviteSummary
|
||||
|
||||
sealed interface InviteListEvents {
|
||||
|
||||
data class AcceptInvite(val invite: InviteListInviteSummary) : InviteListEvents
|
||||
data class DeclineInvite(val invite: InviteListInviteSummary) : InviteListEvents
|
||||
|
||||
object ConfirmDeclineInvite: InviteListEvents
|
||||
object CancelDeclineInvite: InviteListEvents
|
||||
|
||||
object DismissAcceptError: InviteListEvents
|
||||
object DismissDeclineError: InviteListEvents
|
||||
data object ConfirmDeclineInvite: InviteListEvents
|
||||
data object CancelDeclineInvite: InviteListEvents
|
||||
|
||||
data object DismissAcceptError: InviteListEvents
|
||||
data object DismissDeclineError: InviteListEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@ data class InviteListState(
|
|||
)
|
||||
|
||||
sealed interface InviteDeclineConfirmationDialog {
|
||||
object Hidden : InviteDeclineConfirmationDialog
|
||||
data object Hidden : InviteDeclineConfirmationDialog
|
||||
data class Visible(val isDirect: Boolean, val name: String) : InviteDeclineConfirmationDialog
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import io.element.android.libraries.matrix.api.core.RoomId
|
|||
|
||||
sealed interface LeaveRoomEvent {
|
||||
data class ShowConfirmation(val roomId: RoomId) : LeaveRoomEvent
|
||||
object HideConfirmation : LeaveRoomEvent
|
||||
data object HideConfirmation : LeaveRoomEvent
|
||||
data class LeaveRoom(val roomId: RoomId) : LeaveRoomEvent
|
||||
object HideError : LeaveRoomEvent
|
||||
data object HideError : LeaveRoomEvent
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,19 +25,19 @@ data class LeaveRoomState(
|
|||
val eventSink: (LeaveRoomEvent) -> Unit = {},
|
||||
) {
|
||||
sealed interface Confirmation {
|
||||
object Hidden : Confirmation
|
||||
data object Hidden : Confirmation
|
||||
data class Generic(val roomId: RoomId) : Confirmation
|
||||
data class PrivateRoom(val roomId: RoomId) : Confirmation
|
||||
data class LastUserInRoom(val roomId: RoomId) : Confirmation
|
||||
}
|
||||
|
||||
sealed interface Progress {
|
||||
object Hidden : Progress
|
||||
object Shown : Progress
|
||||
data object Hidden : Progress
|
||||
data object Shown : Progress
|
||||
}
|
||||
|
||||
sealed interface Error {
|
||||
object Hidden : Error
|
||||
object Shown : Error
|
||||
data object Hidden : Error
|
||||
data object Shown : Error
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@
|
|||
package io.element.android.features.location.impl.common.permissions
|
||||
|
||||
sealed interface PermissionsEvents {
|
||||
object RequestPermissions : PermissionsEvents
|
||||
data object RequestPermissions : PermissionsEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ data class PermissionsState(
|
|||
val eventSink: (PermissionsEvents) -> Unit = {},
|
||||
) {
|
||||
sealed interface Permissions {
|
||||
object AllGranted : Permissions
|
||||
object SomeGranted : Permissions
|
||||
object NoneGranted : Permissions
|
||||
data object AllGranted : Permissions
|
||||
data object SomeGranted : Permissions
|
||||
data object NoneGranted : Permissions
|
||||
}
|
||||
|
||||
val isAnyGranted: Boolean
|
||||
|
|
|
|||
|
|
@ -30,13 +30,9 @@ sealed interface SendLocationEvents {
|
|||
)
|
||||
}
|
||||
|
||||
object SwitchToMyLocationMode : SendLocationEvents
|
||||
|
||||
object SwitchToPinLocationMode : SendLocationEvents
|
||||
|
||||
object DismissDialog : SendLocationEvents
|
||||
|
||||
object RequestPermissions : SendLocationEvents
|
||||
|
||||
object OpenAppSettings : SendLocationEvents
|
||||
data object SwitchToMyLocationMode : SendLocationEvents
|
||||
data object SwitchToPinLocationMode : SendLocationEvents
|
||||
data object DismissDialog : SendLocationEvents
|
||||
data object RequestPermissions : SendLocationEvents
|
||||
data object OpenAppSettings : SendLocationEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ data class SendLocationState(
|
|||
val eventSink: (SendLocationEvents) -> Unit = {},
|
||||
) {
|
||||
sealed interface Mode {
|
||||
object SenderLocation : Mode
|
||||
object PinLocation : Mode
|
||||
data object SenderLocation : Mode
|
||||
data object PinLocation : Mode
|
||||
}
|
||||
|
||||
sealed interface Dialog {
|
||||
object None : Dialog
|
||||
object PermissionRationale : Dialog
|
||||
object PermissionDenied : Dialog
|
||||
data object None : Dialog
|
||||
data object PermissionRationale : Dialog
|
||||
data object PermissionDenied : Dialog
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,9 @@
|
|||
package io.element.android.features.location.impl.show
|
||||
|
||||
sealed interface ShowLocationEvents {
|
||||
object Share : ShowLocationEvents
|
||||
data object Share : ShowLocationEvents
|
||||
data class TrackMyLocation(val enabled: Boolean) : ShowLocationEvents
|
||||
object DismissDialog : ShowLocationEvents
|
||||
|
||||
object RequestPermissions : ShowLocationEvents
|
||||
|
||||
object OpenAppSettings : ShowLocationEvents
|
||||
data object DismissDialog : ShowLocationEvents
|
||||
data object RequestPermissions : ShowLocationEvents
|
||||
data object OpenAppSettings : ShowLocationEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ data class ShowLocationState(
|
|||
val eventSink: (ShowLocationEvents) -> Unit,
|
||||
) {
|
||||
sealed interface Dialog {
|
||||
object None : Dialog
|
||||
object PermissionRationale : Dialog
|
||||
object PermissionDenied : Dialog
|
||||
data object None : Dialog
|
||||
data object PermissionRationale : Dialog
|
||||
data object PermissionDenied : Dialog
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@
|
|||
package io.element.android.features.login.api.oidc
|
||||
|
||||
sealed interface OidcAction {
|
||||
object GoBack : OidcAction
|
||||
data object GoBack : OidcAction
|
||||
data class Success(val url: String) : OidcAction
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,16 +85,16 @@ class LoginFlowNode @AssistedInject constructor(
|
|||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
object ConfirmAccountProvider : NavTarget
|
||||
data object ConfirmAccountProvider : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object ChangeAccountProvider : NavTarget
|
||||
data object ChangeAccountProvider : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object SearchAccountProvider : NavTarget
|
||||
data object SearchAccountProvider : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object LoginPassword : NavTarget
|
||||
data object LoginPassword : NavTarget
|
||||
|
||||
@Parcelize
|
||||
data class WaitList(val loginFormState: LoginFormState) : NavTarget
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ import io.element.android.features.login.impl.accountprovider.AccountProvider
|
|||
|
||||
sealed interface ChangeServerEvents {
|
||||
data class ChangeServer(val accountProvider: AccountProvider) : ChangeServerEvents
|
||||
object ClearError : ChangeServerEvents
|
||||
data object ClearError : ChangeServerEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ sealed class ChangeServerError : Throwable() {
|
|||
@Composable
|
||||
fun message(): String = stringResource(messageId)
|
||||
}
|
||||
object SlidingSyncAlert : ChangeServerError()
|
||||
data object SlidingSyncAlert : ChangeServerError()
|
||||
|
||||
companion object {
|
||||
fun from(error: Throwable): ChangeServerError = when (error) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package io.element.android.features.login.impl.oidc.webview
|
|||
import io.element.android.features.login.api.oidc.OidcAction
|
||||
|
||||
sealed interface OidcEvents {
|
||||
object Cancel : OidcEvents
|
||||
data object Cancel : OidcEvents
|
||||
data class OidcActionEvent(val oidcAction: OidcAction): OidcEvents
|
||||
object ClearError : OidcEvents
|
||||
data object ClearError : OidcEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@
|
|||
package io.element.android.features.login.impl.screens.confirmaccountprovider
|
||||
|
||||
sealed interface ConfirmAccountProviderEvents {
|
||||
object Continue : ConfirmAccountProviderEvents
|
||||
object ClearError : ConfirmAccountProviderEvents
|
||||
data object Continue : ConfirmAccountProviderEvents
|
||||
data object ClearError : ConfirmAccountProviderEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,6 @@ data class ConfirmAccountProviderState(
|
|||
}
|
||||
|
||||
sealed interface LoginFlow {
|
||||
object PasswordLogin : LoginFlow
|
||||
data object PasswordLogin : LoginFlow
|
||||
data class OidcFlow(val oidcDetails: OidcDetails) : LoginFlow
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ package io.element.android.features.login.impl.screens.loginpassword
|
|||
sealed interface LoginPasswordEvents {
|
||||
data class SetLogin(val login: String) : LoginPasswordEvents
|
||||
data class SetPassword(val password: String) : LoginPasswordEvents
|
||||
object Submit : LoginPasswordEvents
|
||||
object ClearError : LoginPasswordEvents
|
||||
data object Submit : LoginPasswordEvents
|
||||
data object ClearError : LoginPasswordEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
package io.element.android.features.login.impl.screens.waitlistscreen
|
||||
|
||||
sealed interface WaitListEvents {
|
||||
object AttemptLogin : WaitListEvents
|
||||
object ClearError : WaitListEvents
|
||||
object Continue : WaitListEvents
|
||||
data object AttemptLogin : WaitListEvents
|
||||
data object ClearError : WaitListEvents
|
||||
data object Continue : WaitListEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@
|
|||
package io.element.android.features.logout.api
|
||||
|
||||
sealed interface LogoutPreferenceEvents {
|
||||
object Logout : LogoutPreferenceEvents
|
||||
data object Logout : LogoutPreferenceEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ sealed interface MessagesEvents {
|
|||
data class HandleAction(val action: TimelineItemAction, val event: TimelineItem.Event) : MessagesEvents
|
||||
data class ToggleReaction(val emoji: String, val eventId: EventId) : MessagesEvents
|
||||
data class InviteDialogDismissed(val action: InviteDialogAction) : MessagesEvents
|
||||
object Dismiss : MessagesEvents
|
||||
data object Dismiss : MessagesEvents
|
||||
}
|
||||
|
||||
enum class InviteDialogAction {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class MessagesFlowNode @AssistedInject constructor(
|
|||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
object Messages : NavTarget
|
||||
data object Messages : NavTarget
|
||||
|
||||
@Parcelize
|
||||
data class MediaViewer(
|
||||
|
|
@ -100,7 +100,7 @@ class MessagesFlowNode @AssistedInject constructor(
|
|||
data class ReportMessage(val eventId: EventId, val senderId: UserId) : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object SendLocation : NavTarget
|
||||
data object SendLocation : NavTarget
|
||||
}
|
||||
|
||||
private val callback = plugins<MessagesEntryPoint.Callback>().firstOrNull()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ package io.element.android.features.messages.impl.actionlist
|
|||
import io.element.android.features.messages.impl.timeline.model.TimelineItem
|
||||
|
||||
sealed interface ActionListEvents {
|
||||
object Clear : ActionListEvents
|
||||
data object Clear : ActionListEvents
|
||||
data class ComputeForMessage(val event: TimelineItem.Event, val canRedact: Boolean) : ActionListEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ data class ActionListState(
|
|||
val eventSink: (ActionListEvents) -> Unit,
|
||||
) {
|
||||
sealed interface Target {
|
||||
object None : Target
|
||||
data object None : Target
|
||||
data class Loading(val event: TimelineItem.Event) : Target
|
||||
data class Success(
|
||||
val event: TimelineItem.Event,
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ sealed class TimelineItemAction(
|
|||
@DrawableRes val icon: Int,
|
||||
val destructive: Boolean = false
|
||||
) {
|
||||
object Forward : TimelineItemAction(CommonStrings.action_forward, VectorIcons.Forward)
|
||||
object Copy : TimelineItemAction(CommonStrings.action_copy, VectorIcons.Copy)
|
||||
object Redact : TimelineItemAction(CommonStrings.action_remove, VectorIcons.Delete, destructive = true)
|
||||
object Reply : TimelineItemAction(CommonStrings.action_reply, VectorIcons.Reply)
|
||||
object Edit : TimelineItemAction(CommonStrings.action_edit, VectorIcons.Edit)
|
||||
object Developer : TimelineItemAction(CommonStrings.action_view_source, VectorIcons.DeveloperMode)
|
||||
object ReportContent : TimelineItemAction(CommonStrings.action_report_content, VectorIcons.ReportContent, destructive = true)
|
||||
data object Forward : TimelineItemAction(CommonStrings.action_forward, VectorIcons.Forward)
|
||||
data object Copy : TimelineItemAction(CommonStrings.action_copy, VectorIcons.Copy)
|
||||
data object Redact : TimelineItemAction(CommonStrings.action_remove, VectorIcons.Delete, destructive = true)
|
||||
data object Reply : TimelineItemAction(CommonStrings.action_reply, VectorIcons.Reply)
|
||||
data object Edit : TimelineItemAction(CommonStrings.action_edit, VectorIcons.Edit)
|
||||
data object Developer : TimelineItemAction(CommonStrings.action_view_source, VectorIcons.DeveloperMode)
|
||||
data object ReportContent : TimelineItemAction(CommonStrings.action_report_content, VectorIcons.ReportContent, destructive = true)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,6 @@ import androidx.compose.runtime.Immutable
|
|||
|
||||
@Immutable
|
||||
sealed interface AttachmentsPreviewEvents {
|
||||
object SendAttachment : AttachmentsPreviewEvents
|
||||
object ClearSendState : AttachmentsPreviewEvents
|
||||
data object SendAttachment : AttachmentsPreviewEvents
|
||||
data object ClearSendState : AttachmentsPreviewEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ data class AttachmentsPreviewState(
|
|||
)
|
||||
|
||||
sealed interface SendActionState {
|
||||
object Idle : SendActionState
|
||||
data object Idle : SendActionState
|
||||
sealed interface Sending : SendActionState {
|
||||
object Processing : Sending
|
||||
data object Processing : Sending
|
||||
data class Uploading(val progress: Float) : Sending
|
||||
}
|
||||
|
||||
data class Failure(val error: Throwable) : SendActionState
|
||||
object Done : SendActionState
|
||||
data object Done : SendActionState
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ import io.element.android.libraries.matrix.api.roomlist.RoomSummaryDetails
|
|||
sealed interface ForwardMessagesEvents {
|
||||
data class SetSelectedRoom(val room: RoomSummaryDetails) : ForwardMessagesEvents
|
||||
// TODO remove to restore multi-selection
|
||||
object RemoveSelectedRoom : ForwardMessagesEvents
|
||||
object ToggleSearchActive : ForwardMessagesEvents
|
||||
data object RemoveSelectedRoom : ForwardMessagesEvents
|
||||
data object ToggleSearchActive : ForwardMessagesEvents
|
||||
data class UpdateQuery(val query: String) : ForwardMessagesEvents
|
||||
object ForwardEvent : ForwardMessagesEvents
|
||||
object ClearError : ForwardMessagesEvents
|
||||
data object ForwardEvent : ForwardMessagesEvents
|
||||
data object ClearError : ForwardMessagesEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
package io.element.android.features.messages.impl.media.viewer
|
||||
|
||||
sealed interface MediaViewerEvents {
|
||||
object SaveOnDisk: MediaViewerEvents
|
||||
object Share: MediaViewerEvents
|
||||
object OpenWith: MediaViewerEvents
|
||||
object RetryLoading : MediaViewerEvents
|
||||
object ClearLoadingError : MediaViewerEvents
|
||||
data object SaveOnDisk: MediaViewerEvents
|
||||
data object Share: MediaViewerEvents
|
||||
data object OpenWith: MediaViewerEvents
|
||||
data object RetryLoading : MediaViewerEvents
|
||||
data object ClearLoadingError : MediaViewerEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,20 +21,20 @@ import io.element.android.libraries.textcomposer.MessageComposerMode
|
|||
|
||||
@Immutable
|
||||
sealed interface MessageComposerEvents {
|
||||
object ToggleFullScreenState : MessageComposerEvents
|
||||
data object ToggleFullScreenState : MessageComposerEvents
|
||||
data class FocusChanged(val hasFocus: Boolean) : MessageComposerEvents
|
||||
data class SendMessage(val message: String) : MessageComposerEvents
|
||||
object CloseSpecialMode : MessageComposerEvents
|
||||
data object CloseSpecialMode : MessageComposerEvents
|
||||
data class SetMode(val composerMode: MessageComposerMode) : MessageComposerEvents
|
||||
data class UpdateText(val text: String) : MessageComposerEvents
|
||||
object AddAttachment : MessageComposerEvents
|
||||
object DismissAttachmentMenu : MessageComposerEvents
|
||||
data object AddAttachment : MessageComposerEvents
|
||||
data object DismissAttachmentMenu : MessageComposerEvents
|
||||
sealed interface PickAttachmentSource : MessageComposerEvents {
|
||||
object FromGallery : PickAttachmentSource
|
||||
object FromFiles : PickAttachmentSource
|
||||
object PhotoFromCamera : PickAttachmentSource
|
||||
object VideoFromCamera : PickAttachmentSource
|
||||
object Location : PickAttachmentSource
|
||||
data object FromGallery : PickAttachmentSource
|
||||
data object FromFiles : PickAttachmentSource
|
||||
data object PhotoFromCamera : PickAttachmentSource
|
||||
data object VideoFromCamera : PickAttachmentSource
|
||||
data object Location : PickAttachmentSource
|
||||
}
|
||||
object CancelSendAttachment : MessageComposerEvents
|
||||
data object CancelSendAttachment : MessageComposerEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ data class MessageComposerState(
|
|||
|
||||
@Immutable
|
||||
sealed interface AttachmentsState {
|
||||
object None : AttachmentsState
|
||||
data object None : AttachmentsState
|
||||
data class Previewing(val attachments: ImmutableList<Attachment>) : AttachmentsState
|
||||
sealed interface Sending : AttachmentsState {
|
||||
data class Processing(val attachments: ImmutableList<Attachment>) : Sending
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ package io.element.android.features.messages.impl.report
|
|||
|
||||
sealed interface ReportMessageEvents {
|
||||
data class UpdateReason(val reason: String) : ReportMessageEvents
|
||||
object ToggleBlockUser : ReportMessageEvents
|
||||
object Report : ReportMessageEvents
|
||||
object ClearError : ReportMessageEvents
|
||||
data object ToggleBlockUser : ReportMessageEvents
|
||||
data object Report : ReportMessageEvents
|
||||
data object ClearError : ReportMessageEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package io.element.android.features.messages.impl.timeline
|
|||
import io.element.android.libraries.matrix.api.core.EventId
|
||||
|
||||
sealed interface TimelineEvents {
|
||||
object LoadMore : TimelineEvents
|
||||
data object LoadMore : TimelineEvents
|
||||
data class SetHighlightedEvent(val eventId: EventId?) : TimelineEvents
|
||||
data class OnScrollFinished(val firstIndex: Int) : TimelineEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,6 @@ import io.element.android.features.messages.impl.timeline.model.AggregatedReacti
|
|||
import io.element.android.libraries.matrix.api.core.EventId
|
||||
|
||||
sealed interface ReactionSummaryEvents {
|
||||
object Clear : ReactionSummaryEvents
|
||||
data object Clear : ReactionSummaryEvents
|
||||
data class ShowReactionSummary(val eventId: EventId, val reactions: List<AggregatedReaction>, val selectedKey: String) : ReactionSummaryEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import io.element.android.features.messages.impl.timeline.model.TimelineItem
|
|||
|
||||
sealed interface RetrySendMenuEvents {
|
||||
data class EventSelected(val event: TimelineItem.Event) : RetrySendMenuEvents
|
||||
object RetrySend : RetrySendMenuEvents
|
||||
object RemoveFailed : RetrySendMenuEvents
|
||||
object Dismiss: RetrySendMenuEvents
|
||||
data object RetrySend : RetrySendMenuEvents
|
||||
data object RemoveFailed : RetrySendMenuEvents
|
||||
data object Dismiss: RetrySendMenuEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,22 +40,22 @@ sealed interface TimelineItemGroupPosition {
|
|||
/**
|
||||
* The event is part of a group of events from the same sender and is the first sent Event.
|
||||
*/
|
||||
object First : TimelineItemGroupPosition
|
||||
data object First : TimelineItemGroupPosition
|
||||
|
||||
/**
|
||||
* The event is part of a group of events from the same sender and is neither the first nor the last sent Event.
|
||||
*/
|
||||
object Middle : TimelineItemGroupPosition
|
||||
data object Middle : TimelineItemGroupPosition
|
||||
|
||||
/**
|
||||
* The event is part of a group of events from the same sender and is the last sent Event.
|
||||
*/
|
||||
object Last : TimelineItemGroupPosition
|
||||
data object Last : TimelineItemGroupPosition
|
||||
|
||||
/**
|
||||
* The event is not part of a group of events. Sender of previous event is different, and sender of next event is different.
|
||||
*/
|
||||
object None : TimelineItemGroupPosition
|
||||
data object None : TimelineItemGroupPosition
|
||||
|
||||
/**
|
||||
* Return true if the previous sender of the event is a different sender.
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class PollFlowNode @AssistedInject constructor(
|
|||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
object Root : NavTarget
|
||||
data object Root : NavTarget
|
||||
}
|
||||
|
||||
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
||||
|
|
|
|||
|
|
@ -55,16 +55,16 @@ class PreferencesFlowNode @AssistedInject constructor(
|
|||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
object Root : NavTarget
|
||||
data object Root : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object DeveloperSettings : NavTarget
|
||||
data object DeveloperSettings : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object AnalyticsSettings : NavTarget
|
||||
data object AnalyticsSettings : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object About : NavTarget
|
||||
data object About : NavTarget
|
||||
}
|
||||
|
||||
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ sealed class ElementLegal(
|
|||
@StringRes val titleRes: Int,
|
||||
val url: String,
|
||||
) {
|
||||
object Copyright : ElementLegal(CommonStrings.common_copyright, COPYRIGHT_URL)
|
||||
object AcceptableUsePolicy : ElementLegal(CommonStrings.common_acceptable_use_policy, USE_POLICY_URL)
|
||||
object PrivacyPolicy : ElementLegal(CommonStrings.common_privacy_policy, PRIVACY_URL)
|
||||
data object Copyright : ElementLegal(CommonStrings.common_copyright, COPYRIGHT_URL)
|
||||
data object AcceptableUsePolicy : ElementLegal(CommonStrings.common_acceptable_use_policy, USE_POLICY_URL)
|
||||
data object PrivacyPolicy : ElementLegal(CommonStrings.common_privacy_policy, PRIVACY_URL)
|
||||
}
|
||||
|
||||
fun getAllLegals(): List<ElementLegal> {
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ import io.element.android.libraries.featureflag.ui.model.FeatureUiModel
|
|||
|
||||
sealed interface DeveloperSettingsEvents {
|
||||
data class UpdateEnabledFeature(val feature: FeatureUiModel, val isEnabled: Boolean) : DeveloperSettingsEvents
|
||||
object ClearCache: DeveloperSettingsEvents
|
||||
data object ClearCache: DeveloperSettingsEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@
|
|||
package io.element.android.features.rageshake.api.crash
|
||||
|
||||
sealed interface CrashDetectionEvents {
|
||||
object ResetAllCrashData : CrashDetectionEvents
|
||||
object ResetAppHasCrashed : CrashDetectionEvents
|
||||
data object ResetAllCrashData : CrashDetectionEvents
|
||||
data object ResetAppHasCrashed : CrashDetectionEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ package io.element.android.features.rageshake.api.detection
|
|||
import io.element.android.features.rageshake.api.screenshot.ImageResult
|
||||
|
||||
sealed interface RageshakeDetectionEvents {
|
||||
object Dismiss : RageshakeDetectionEvents
|
||||
object Disable : RageshakeDetectionEvents
|
||||
object StartDetection : RageshakeDetectionEvents
|
||||
object StopDetection : RageshakeDetectionEvents
|
||||
data object Dismiss : RageshakeDetectionEvents
|
||||
data object Disable : RageshakeDetectionEvents
|
||||
data object StartDetection : RageshakeDetectionEvents
|
||||
data object StopDetection : RageshakeDetectionEvents
|
||||
data class ProcessScreenshot(val imageResult: ImageResult) : RageshakeDetectionEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
package io.element.android.features.rageshake.impl.bugreport
|
||||
|
||||
sealed interface BugReportEvents {
|
||||
object SendBugReport : BugReportEvents
|
||||
object ResetAll : BugReportEvents
|
||||
object ClearError : BugReportEvents
|
||||
data object SendBugReport : BugReportEvents
|
||||
data object ResetAll : BugReportEvents
|
||||
data object ClearError : BugReportEvents
|
||||
|
||||
data class SetDescription(val description: String) : BugReportEvents
|
||||
data class SetSendLog(val sendLog: Boolean) : BugReportEvents
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ interface RoomDetailsEntryPoint : FeatureEntryPoint {
|
|||
|
||||
sealed interface InitialTarget : Parcelable {
|
||||
@Parcelize
|
||||
object RoomDetails : InitialTarget
|
||||
data object RoomDetails : InitialTarget
|
||||
|
||||
@Parcelize
|
||||
data class RoomMemberDetails(val roomMemberId: UserId) : InitialTarget
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
package io.element.android.features.roomdetails.impl
|
||||
|
||||
sealed interface RoomDetailsAction {
|
||||
object Edit : RoomDetailsAction
|
||||
|
||||
object AddTopic : RoomDetailsAction
|
||||
data object Edit : RoomDetailsAction
|
||||
data object AddTopic : RoomDetailsAction
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@
|
|||
package io.element.android.features.roomdetails.impl
|
||||
|
||||
sealed interface RoomDetailsEvent {
|
||||
object LeaveRoom : RoomDetailsEvent
|
||||
data object LeaveRoom : RoomDetailsEvent
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,16 +55,16 @@ class RoomDetailsFlowNode @AssistedInject constructor(
|
|||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
object RoomDetails : NavTarget
|
||||
data object RoomDetails : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object RoomMemberList : NavTarget
|
||||
data object RoomMemberList : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object RoomDetailsEdit : NavTarget
|
||||
data object RoomDetailsEdit : NavTarget
|
||||
|
||||
@Parcelize
|
||||
object InviteMembers : NavTarget
|
||||
data object InviteMembers : NavTarget
|
||||
|
||||
@Parcelize
|
||||
data class RoomMemberDetails(val roomMemberId: UserId) : NavTarget
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ data class RoomDetailsState(
|
|||
)
|
||||
|
||||
sealed interface RoomDetailsType {
|
||||
object Room : RoomDetailsType
|
||||
data object Room : RoomDetailsType
|
||||
data class Dm(val roomMember: RoomMember) : RoomDetailsType
|
||||
}
|
||||
|
||||
sealed interface RoomTopicState {
|
||||
object Hidden : RoomTopicState
|
||||
object CanAddTopic : RoomTopicState
|
||||
data object Hidden : RoomTopicState
|
||||
data object CanAddTopic : RoomTopicState
|
||||
data class ExistingTopic(val topic: String) : RoomTopicState
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ sealed interface RoomDetailsEditEvents {
|
|||
data class HandleAvatarAction(val action: AvatarAction) : RoomDetailsEditEvents
|
||||
data class UpdateRoomName(val name: String) : RoomDetailsEditEvents
|
||||
data class UpdateRoomTopic(val topic: String) : RoomDetailsEditEvents
|
||||
object Save : RoomDetailsEditEvents
|
||||
object CancelSaveChanges : RoomDetailsEditEvents
|
||||
data object Save : RoomDetailsEditEvents
|
||||
data object CancelSaveChanges : RoomDetailsEditEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ package io.element.android.features.roomdetails.impl.members.details
|
|||
sealed interface RoomMemberDetailsEvents {
|
||||
data class BlockUser(val needsConfirmation: Boolean = false) : RoomMemberDetailsEvents
|
||||
data class UnblockUser(val needsConfirmation: Boolean = false) : RoomMemberDetailsEvents
|
||||
object ClearBlockUserError : RoomMemberDetailsEvents
|
||||
object ClearConfirmationDialog : RoomMemberDetailsEvents
|
||||
data object ClearBlockUserError : RoomMemberDetailsEvents
|
||||
data object ClearConfirmationDialog : RoomMemberDetailsEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ import io.element.android.libraries.matrix.api.core.RoomId
|
|||
sealed interface RoomListEvents {
|
||||
data class UpdateFilter(val newFilter: String) : RoomListEvents
|
||||
data class UpdateVisibleRange(val range: IntRange) : RoomListEvents
|
||||
object DismissRequestVerificationPrompt : RoomListEvents
|
||||
object ToggleSearchResults : RoomListEvents
|
||||
data object DismissRequestVerificationPrompt : RoomListEvents
|
||||
data object ToggleSearchResults : RoomListEvents
|
||||
data class ShowContextMenu(val roomListRoomSummary: RoomListRoomSummary) : RoomListEvents
|
||||
object HideContextMenu : RoomListEvents
|
||||
data object HideContextMenu : RoomListEvents
|
||||
data class LeaveRoom(val roomId: RoomId) : RoomListEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ data class RoomListState(
|
|||
val eventSink: (RoomListEvents) -> Unit,
|
||||
) {
|
||||
sealed interface ContextMenu {
|
||||
object Hidden : ContextMenu
|
||||
data object Hidden : ContextMenu
|
||||
data class Shown(
|
||||
val roomId: RoomId,
|
||||
val roomName: String,
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ data class VerifySelfSessionState(
|
|||
|
||||
@Stable
|
||||
sealed interface VerificationStep {
|
||||
object Initial : VerificationStep
|
||||
object Canceled : VerificationStep
|
||||
object AwaitingOtherDeviceResponse : VerificationStep
|
||||
object Ready : VerificationStep
|
||||
data object Initial : VerificationStep
|
||||
data object Canceled : VerificationStep
|
||||
data object AwaitingOtherDeviceResponse : VerificationStep
|
||||
data object Ready : VerificationStep
|
||||
data class Verifying(val emojiList: List<VerificationEmoji>, val state: Async<Unit>) : VerificationStep
|
||||
object Completed : VerificationStep
|
||||
data object Completed : VerificationStep
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,19 +125,19 @@ class VerifySelfSessionStateMachine @Inject constructor(
|
|||
|
||||
sealed interface State {
|
||||
/** The initial state, before verification started. */
|
||||
object Initial : State
|
||||
data object Initial : State
|
||||
|
||||
/** Waiting for verification acceptance. */
|
||||
object RequestingVerification : State
|
||||
data object RequestingVerification : State
|
||||
|
||||
/** Verification request accepted. Waiting for start. */
|
||||
object VerificationRequestAccepted : State
|
||||
data object VerificationRequestAccepted : State
|
||||
|
||||
/** Waiting for SaS verification start. */
|
||||
object StartingSasVerification : State
|
||||
data object StartingSasVerification : State
|
||||
|
||||
/** A SaS verification flow has been started. */
|
||||
object SasVerificationStarted : State
|
||||
data object SasVerificationStarted : State
|
||||
|
||||
sealed class Verifying(open val emojis: List<VerificationEmoji>) : State {
|
||||
/** Verification accepted and emojis received. */
|
||||
|
|
@ -148,50 +148,50 @@ class VerifySelfSessionStateMachine @Inject constructor(
|
|||
}
|
||||
|
||||
/** The verification is being canceled. */
|
||||
object Canceling : State
|
||||
data object Canceling : State
|
||||
|
||||
/** The verification has been canceled, remotely or locally. */
|
||||
object Canceled : State
|
||||
data object Canceled : State
|
||||
|
||||
/** Verification successful. */
|
||||
object Completed : State
|
||||
data object Completed : State
|
||||
}
|
||||
|
||||
sealed interface Event {
|
||||
/** Request verification. */
|
||||
object RequestVerification : Event
|
||||
data object RequestVerification : Event
|
||||
|
||||
/** The current verification request has been accepted. */
|
||||
object DidAcceptVerificationRequest : Event
|
||||
data object DidAcceptVerificationRequest : Event
|
||||
|
||||
/** Start a SaS verification flow. */
|
||||
object StartSasVerification : Event
|
||||
data object StartSasVerification : Event
|
||||
|
||||
/** Started a SaS verification flow. */
|
||||
object DidStartSasVerification : Event
|
||||
data object DidStartSasVerification : Event
|
||||
|
||||
/** Has received emojis. */
|
||||
data class DidReceiveChallenge(val emojis: List<VerificationEmoji>) : Event
|
||||
|
||||
/** Emojis match. */
|
||||
object AcceptChallenge : Event
|
||||
data object AcceptChallenge : Event
|
||||
|
||||
/** Emojis do not match. */
|
||||
object DeclineChallenge : Event
|
||||
data object DeclineChallenge : Event
|
||||
|
||||
/** Remote accepted challenge. */
|
||||
object DidAcceptChallenge : Event
|
||||
data object DidAcceptChallenge : Event
|
||||
|
||||
/** Request cancellation. */
|
||||
object Cancel : Event
|
||||
data object Cancel : Event
|
||||
|
||||
/** Verification cancelled. */
|
||||
object DidCancel : Event
|
||||
data object DidCancel : Event
|
||||
|
||||
/** Request failed. */
|
||||
object DidFail : Event
|
||||
data object DidFail : Event
|
||||
|
||||
/** Restart the verification flow. */
|
||||
object Restart : Event
|
||||
data object Restart : Event
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
package io.element.android.features.verifysession.impl
|
||||
|
||||
sealed interface VerifySelfSessionViewEvents {
|
||||
object RequestVerification: VerifySelfSessionViewEvents
|
||||
object StartSasVerification: VerifySelfSessionViewEvents
|
||||
object Restart: VerifySelfSessionViewEvents
|
||||
object ConfirmVerification: VerifySelfSessionViewEvents
|
||||
object DeclineVerification: VerifySelfSessionViewEvents
|
||||
object CancelAndClose: VerifySelfSessionViewEvents
|
||||
data object RequestVerification: VerifySelfSessionViewEvents
|
||||
data object StartSasVerification: VerifySelfSessionViewEvents
|
||||
data object Restart: VerifySelfSessionViewEvents
|
||||
data object ConfirmVerification: VerifySelfSessionViewEvents
|
||||
data object DeclineVerification: VerifySelfSessionViewEvents
|
||||
data object CancelAndClose: VerifySelfSessionViewEvents
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue