diff --git a/appnav/src/main/kotlin/io/element/android/appnav/loggedin/LoggedInPresenter.kt b/appnav/src/main/kotlin/io/element/android/appnav/loggedin/LoggedInPresenter.kt index 934803fe26..61f1ce715c 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/loggedin/LoggedInPresenter.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/loggedin/LoggedInPresenter.kt @@ -122,7 +122,7 @@ class LoggedInPresenter( ignoreRegistrationError = ignoreRegistrationError, forceNativeSlidingSyncMigration = forceNativeSlidingSyncMigration, appName = buildMeta.applicationName, - eventSink = ::handleEvent + eventSink = ::handleEvent, ) } diff --git a/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInPresenter.kt b/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInPresenter.kt index fd590955c8..718d90cfd8 100644 --- a/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInPresenter.kt +++ b/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInPresenter.kt @@ -27,7 +27,7 @@ class AnalyticsOptInPresenter( override fun present(): AnalyticsOptInState { val localCoroutineScope = rememberCoroutineScope() - fun handleEvents(event: AnalyticsOptInEvents) { + fun handleEvent(event: AnalyticsOptInEvents) { when (event) { is AnalyticsOptInEvents.EnableAnalytics -> localCoroutineScope.setIsEnabled(event.isEnabled) } @@ -39,7 +39,7 @@ class AnalyticsOptInPresenter( return AnalyticsOptInState( applicationName = buildMeta.applicationName, hasPolicyLink = AnalyticsConfig.POLICY_LINK.isNotEmpty(), - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/preferences/AnalyticsPreferencesPresenter.kt b/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/preferences/AnalyticsPreferencesPresenter.kt index fee6188d23..3e7d5aa305 100644 --- a/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/preferences/AnalyticsPreferencesPresenter.kt +++ b/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/preferences/AnalyticsPreferencesPresenter.kt @@ -30,7 +30,7 @@ class AnalyticsPreferencesPresenter( val localCoroutineScope = rememberCoroutineScope() val isEnabled = analyticsService.userConsentFlow.collectAsState(initial = false) - fun handleEvents(event: AnalyticsOptInEvents) { + fun handleEvent(event: AnalyticsOptInEvents) { when (event) { is AnalyticsOptInEvents.EnableAnalytics -> localCoroutineScope.setIsEnabled(event.isEnabled) } @@ -40,7 +40,7 @@ class AnalyticsPreferencesPresenter( applicationName = buildMeta.applicationName, isEnabled = isEnabled.value, policyUrl = AnalyticsConfig.POLICY_LINK, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenter.kt b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenter.kt index 4d1b2f3e4b..428421ab3e 100644 --- a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenter.kt +++ b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenter.kt @@ -24,7 +24,7 @@ class SpaceAnnouncementPresenter( override fun present(): SpaceAnnouncementState { val localCoroutineScope = rememberCoroutineScope() - fun handleEvents(event: SpaceAnnouncementEvents) { + fun handleEvent(event: SpaceAnnouncementEvents) { when (event) { SpaceAnnouncementEvents.Continue -> localCoroutineScope.launch { announcementStore.setAnnouncementStatus(Announcement.Space, AnnouncementStatus.Shown) @@ -33,7 +33,7 @@ class SpaceAnnouncementPresenter( } return SpaceAnnouncementState( - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt index a7302c9730..9a3637c997 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt @@ -161,7 +161,7 @@ class CallScreenPresenter( } } - fun handleEvents(event: CallScreenEvents) { + fun handleEvent(event: CallScreenEvents) { when (event) { is CallScreenEvents.Hangup -> { val widgetId = callWidgetDriver.value?.id @@ -201,7 +201,7 @@ class CallScreenPresenter( userAgent = userAgent, isCallActive = isWidgetLoaded, isInWidgetMode = isInWidgetMode, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt index ae28b95bba..9784a8c700 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt @@ -116,7 +116,7 @@ class ConfigureRoomPresenter( localCoroutineScope.createRoom(config, createRoomAction) } - fun handleEvents(event: ConfigureRoomEvents) { + fun handleEvent(event: ConfigureRoomEvents) { when (event) { is ConfigureRoomEvents.RoomNameChanged -> dataStore.setRoomName(event.name) is ConfigureRoomEvents.TopicChanged -> dataStore.setTopic(event.topic) @@ -149,7 +149,7 @@ class ConfigureRoomPresenter( cameraPermissionState = cameraPermissionState, homeserverName = homeserverName, roomAddressValidity = roomAddressValidity.value, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/deactivation/impl/src/main/kotlin/io/element/android/features/logout/impl/AccountDeactivationPresenter.kt b/features/deactivation/impl/src/main/kotlin/io/element/android/features/logout/impl/AccountDeactivationPresenter.kt index eb751366a8..4fd1320842 100644 --- a/features/deactivation/impl/src/main/kotlin/io/element/android/features/logout/impl/AccountDeactivationPresenter.kt +++ b/features/deactivation/impl/src/main/kotlin/io/element/android/features/logout/impl/AccountDeactivationPresenter.kt @@ -33,7 +33,7 @@ class AccountDeactivationPresenter( val formState = remember { mutableStateOf(DeactivateFormState.Default) } - fun handleEvents(event: AccountDeactivationEvents) { + fun handleEvent(event: AccountDeactivationEvents) { when (event) { is AccountDeactivationEvents.SetEraseData -> { updateFormState(formState) { @@ -63,7 +63,7 @@ class AccountDeactivationPresenter( return AccountDeactivationState( deactivateFormState = formState.value, accountDeactivationAction = action.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/forward/impl/src/main/kotlin/io/element/android/features/forward/impl/ForwardMessagesPresenter.kt b/features/forward/impl/src/main/kotlin/io/element/android/features/forward/impl/ForwardMessagesPresenter.kt index b1e9534533..002fbd8ebd 100644 --- a/features/forward/impl/src/main/kotlin/io/element/android/features/forward/impl/ForwardMessagesPresenter.kt +++ b/features/forward/impl/src/main/kotlin/io/element/android/features/forward/impl/ForwardMessagesPresenter.kt @@ -47,7 +47,7 @@ class ForwardMessagesPresenter( @Composable override fun present(): ForwardMessagesState { - fun handleEvents(event: ForwardMessagesEvents) { + fun handleEvent(event: ForwardMessagesEvents) { when (event) { ForwardMessagesEvents.ClearError -> forwardingActionState.value = AsyncAction.Uninitialized } @@ -55,7 +55,7 @@ class ForwardMessagesPresenter( return ForwardMessagesState( forwardAction = forwardingActionState.value, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/notifications/NotificationsOptInPresenter.kt b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/notifications/NotificationsOptInPresenter.kt index b6f5d76351..fc8a392a9b 100644 --- a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/notifications/NotificationsOptInPresenter.kt +++ b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/notifications/NotificationsOptInPresenter.kt @@ -51,7 +51,7 @@ class NotificationsOptInPresenter( override fun present(): NotificationsOptInState { val notificationsPermissionsState = postNotificationPermissionsPresenter.present() - fun handleEvents(event: NotificationsOptInEvents) { + fun handleEvent(event: NotificationsOptInEvents) { when (event) { NotificationsOptInEvents.ContinueClicked -> { if (notificationsPermissionsState.permissionGranted) { @@ -78,7 +78,7 @@ class NotificationsOptInPresenter( return NotificationsOptInState( notificationsPermissionState = notificationsPermissionsState, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/HomePresenter.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/HomePresenter.kt index e3ca9612d1..6e98297a9a 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/HomePresenter.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/HomePresenter.kt @@ -85,7 +85,7 @@ class HomePresenter( val showAvatarIndicator by indicatorService.showRoomListTopBarIndicator() val directLogoutState = logoutPresenter.present() - fun handleEvents(event: HomeEvents) { + fun handleEvent(event: HomeEvents) { when (event) { is HomeEvents.SelectHomeNavigationBarItem -> coroutineState.launch { if (event.item == HomeNavigationBarItem.Spaces) { @@ -117,7 +117,7 @@ class HomePresenter( canReportBug = canReportBug, directLogoutState = directLogoutState, isSpaceFeatureEnabled = isSpaceFeatureEnabled, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/filters/RoomListFiltersPresenter.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/filters/RoomListFiltersPresenter.kt index 08c34d60ff..03b07306bc 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/filters/RoomListFiltersPresenter.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/filters/RoomListFiltersPresenter.kt @@ -27,7 +27,7 @@ class RoomListFiltersPresenter( @Composable override fun present(): RoomListFiltersState { - fun handleEvents(event: RoomListFiltersEvents) { + fun handleEvent(event: RoomListFiltersEvents) { when (event) { RoomListFiltersEvents.ClearSelectedFilters -> { filterSelectionStrategy.clear() @@ -63,7 +63,7 @@ class RoomListFiltersPresenter( return RoomListFiltersState( filterSelectionStates = filters, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/roomlist/RoomListPresenter.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/roomlist/RoomListPresenter.kt index 65d4eb297d..0d6d5eb366 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/roomlist/RoomListPresenter.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/roomlist/RoomListPresenter.kt @@ -113,7 +113,7 @@ class RoomListPresenter( val contextMenu = remember { mutableStateOf(RoomListState.ContextMenu.Hidden) } val declineInviteMenu = remember { mutableStateOf(RoomListState.DeclineInviteMenu.Hidden) } - fun handleEvents(event: RoomListEvents) { + fun handleEvent(event: RoomListEvents) { when (event) { is RoomListEvents.UpdateVisibleRange -> coroutineScope.launch { updateVisibleRange(event.range) @@ -169,7 +169,7 @@ class RoomListPresenter( acceptDeclineInviteState = acceptDeclineInviteState, hideInvitesAvatars = hideInvitesAvatar, canReportRoom = canReportRoom, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/search/RoomListSearchPresenter.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/search/RoomListSearchPresenter.kt index ba77b0cdce..a62a987a22 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/search/RoomListSearchPresenter.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/search/RoomListSearchPresenter.kt @@ -40,7 +40,7 @@ class RoomListSearchPresenter( dataSource.setSearchQuery(searchQuery) } - fun handleEvents(event: RoomListSearchEvents) { + fun handleEvent(event: RoomListSearchEvents) { when (event) { RoomListSearchEvents.ClearQuery -> { searchQuery = "" @@ -61,7 +61,7 @@ class RoomListSearchPresenter( isSearchActive = isSearchActive, query = searchQuery, results = searchResults, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesPresenter.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesPresenter.kt index b4a2fc9339..274ee3da44 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesPresenter.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesPresenter.kt @@ -38,7 +38,7 @@ class HomeSpacesPresenter( seenInvitesStore.seenRoomIds().map { it.toImmutableSet() } }.collectAsState(persistentSetOf()) - fun handleEvents(event: HomeSpacesEvents) { + fun handleEvent(event: HomeSpacesEvents) { // when (event) { } } @@ -47,7 +47,7 @@ class HomeSpacesPresenter( spaceRooms = spaceRooms, seenSpaceInvites = seenSpaceInvites, hideInvitesAvatar = hideInvitesAvatar, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/acceptdecline/AcceptDeclineInvitePresenter.kt b/features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/acceptdecline/AcceptDeclineInvitePresenter.kt index 7d15971fe4..6fbe32d2ec 100644 --- a/features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/acceptdecline/AcceptDeclineInvitePresenter.kt +++ b/features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/acceptdecline/AcceptDeclineInvitePresenter.kt @@ -39,7 +39,7 @@ class AcceptDeclineInvitePresenter( val declinedAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } - fun handleEvents(event: AcceptDeclineInviteEvents) { + fun handleEvent(event: AcceptDeclineInviteEvents) { when (event) { is AcceptDeclineInviteEvents.AcceptInvite -> { localCoroutineScope.acceptInvite(event.invite.roomId, acceptedAction) @@ -70,7 +70,7 @@ class AcceptDeclineInvitePresenter( return AcceptDeclineInviteState( acceptAction = acceptedAction.value, declineAction = declinedAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/declineandblock/DeclineAndBlockPresenter.kt b/features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/declineandblock/DeclineAndBlockPresenter.kt index 59812a5e04..6cc035f791 100644 --- a/features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/declineandblock/DeclineAndBlockPresenter.kt +++ b/features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/declineandblock/DeclineAndBlockPresenter.kt @@ -48,7 +48,7 @@ class DeclineAndBlockPresenter( val coroutineScope = rememberCoroutineScope() - fun handleEvents(event: DeclineAndBlockEvents) { + fun handleEvent(event: DeclineAndBlockEvents) { when (event) { DeclineAndBlockEvents.ClearDeclineAction -> declineAction.value = AsyncAction.Uninitialized DeclineAndBlockEvents.Decline -> coroutineScope.decline(reportReason, blockUser, reportRoom, declineAction) @@ -63,7 +63,7 @@ class DeclineAndBlockPresenter( reportReason = reportReason, blockUser = blockUser, declineAction = declineAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/invitepeople/impl/src/main/kotlin/io/element/android/features/invitepeople/impl/DefaultInvitePeoplePresenter.kt b/features/invitepeople/impl/src/main/kotlin/io/element/android/features/invitepeople/impl/DefaultInvitePeoplePresenter.kt index 5e2b00a3f1..a77d8e54d4 100644 --- a/features/invitepeople/impl/src/main/kotlin/io/element/android/features/invitepeople/impl/DefaultInvitePeoplePresenter.kt +++ b/features/invitepeople/impl/src/main/kotlin/io/element/android/features/invitepeople/impl/DefaultInvitePeoplePresenter.kt @@ -103,7 +103,7 @@ class DefaultInvitePeoplePresenter( ) } - fun handleEvents(event: InvitePeopleEvents) { + fun handleEvent(event: InvitePeopleEvents) { when (event) { is DefaultInvitePeopleEvents.OnSearchActiveChanged -> { searchActive = event.active @@ -139,7 +139,7 @@ class DefaultInvitePeoplePresenter( searchResults = searchResults.value, showSearchLoader = showSearchLoader.value, sendInvitesAction = sendInvitesAction.value, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomPresenter.kt b/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomPresenter.kt index 2d737a17d4..e851d731e3 100644 --- a/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomPresenter.kt +++ b/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomPresenter.kt @@ -151,7 +151,7 @@ class JoinRoomPresenter( contentState.markRoomInviteAsSeen() } - fun handleEvents(event: JoinRoomEvents) { + fun handleEvent(event: JoinRoomEvents) { when (event) { JoinRoomEvents.JoinRoom -> coroutineScope.joinRoom(joinAction) is JoinRoomEvents.KnockRoom -> coroutineScope.knockRoom(knockAction, knockMessage) @@ -197,7 +197,7 @@ class JoinRoomPresenter( knockMessage = knockMessage, hideInviteAvatars = hideInviteAvatars, canReportRoom = canReportRoom, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerPresenter.kt b/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerPresenter.kt index a1db930500..7a81e98d55 100644 --- a/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerPresenter.kt +++ b/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerPresenter.kt @@ -52,7 +52,7 @@ class KnockRequestsBannerPresenter( } } - fun handleEvents(event: KnockRequestsBannerEvents) { + fun handleEvent(event: KnockRequestsBannerEvents) { when (event) { is KnockRequestsBannerEvents.AcceptSingleRequest -> { sessionCoroutineScope.acceptSingleKnockRequest( @@ -73,7 +73,7 @@ class KnockRequestsBannerPresenter( displayAcceptError = showAcceptError.value, canAccept = permissions.canAccept, isVisible = shouldShowBanner, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/list/KnockRequestsListPresenter.kt b/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/list/KnockRequestsListPresenter.kt index ff943fcf6b..54d0a490c8 100644 --- a/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/list/KnockRequestsListPresenter.kt +++ b/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/list/KnockRequestsListPresenter.kt @@ -38,7 +38,7 @@ class KnockRequestsListPresenter( val coroutineScope = rememberCoroutineScope() - fun handleEvents(event: KnockRequestsListEvents) { + fun handleEvent(event: KnockRequestsListEvents) { when (event) { KnockRequestsListEvents.AcceptAll -> { currentAction = KnockRequestsAction.AcceptAll @@ -73,7 +73,7 @@ class KnockRequestsListPresenter( currentAction = currentAction, permissions = permissions, asyncAction = asyncAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/common/permissions/DefaultPermissionsPresenter.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/common/permissions/DefaultPermissionsPresenter.kt index 0ef520aadb..ebb5a6211c 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/common/permissions/DefaultPermissionsPresenter.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/common/permissions/DefaultPermissionsPresenter.kt @@ -33,7 +33,7 @@ class DefaultPermissionsPresenter( override fun present(): PermissionsState { val multiplePermissionsState = rememberMultiplePermissionsState(permissions = permissions) - fun handleEvents(event: PermissionsEvents) { + fun handleEvent(event: PermissionsEvents) { when (event) { PermissionsEvents.RequestPermissions -> multiplePermissionsState.launchMultiplePermissionRequest() } @@ -46,7 +46,7 @@ class DefaultPermissionsPresenter( else -> PermissionsState.Permissions.NoneGranted }, shouldShowRationale = multiplePermissionsState.shouldShowRationale, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationPresenter.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationPresenter.kt index 9914920ac3..96fdc6aea5 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationPresenter.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationPresenter.kt @@ -78,7 +78,7 @@ class SendLocationPresenter( } } - fun handleEvents(event: SendLocationEvents) { + fun handleEvent(event: SendLocationEvents) { when (event) { is SendLocationEvents.SendLocation -> scope.launch { sendLocation(event, mode) @@ -103,7 +103,7 @@ class SendLocationPresenter( mode = mode, hasLocationPermission = permissionsState.isAnyGranted, appName = appName, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenter.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenter.kt index 7929843571..c7c28472df 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenter.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenter.kt @@ -56,7 +56,7 @@ class ShowLocationPresenter( } } - fun handleEvents(event: ShowLocationEvents) { + fun handleEvent(event: ShowLocationEvents) { when (event) { ShowLocationEvents.Share -> locationActions.share(location, description) is ShowLocationEvents.TrackMyLocation -> { @@ -86,7 +86,7 @@ class ShowLocationPresenter( hasLocationPermission = permissionsState.isAnyGranted, isTrackMyLocation = isTrackMyLocation, appName = appName, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/common/permissions/FakePermissionsPresenter.kt b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/common/permissions/FakePermissionsPresenter.kt index 7351dd71f4..7443655a95 100644 --- a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/common/permissions/FakePermissionsPresenter.kt +++ b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/common/permissions/FakePermissionsPresenter.kt @@ -19,7 +19,7 @@ class FakePermissionsPresenter : PermissionsPresenter { private var state = PermissionsState( permissions = PermissionsState.Permissions.NoneGranted, shouldShowRationale = false, - eventSink = ::handleEvent + eventSink = ::handleEvent, ) set(value) { field = value.copy(eventSink = ::handleEvent) diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsPresenter.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsPresenter.kt index 6f238c964b..58f190d103 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsPresenter.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsPresenter.kt @@ -50,7 +50,7 @@ class LockScreenSettingsPresenter( val biometricUnlock = biometricAuthenticatorManager.rememberConfirmBiometricAuthenticator() - fun handleEvents(event: LockScreenSettingsEvents) { + fun handleEvent(event: LockScreenSettingsEvents) { when (event) { LockScreenSettingsEvents.CancelRemovePin -> showRemovePinConfirmation = false LockScreenSettingsEvents.ConfirmRemovePin -> { @@ -82,7 +82,7 @@ class LockScreenSettingsPresenter( isBiometricEnabled = isBiometricEnabled, showRemovePinConfirmation = showRemovePinConfirmation, showToggleBiometric = biometricAuthenticatorManager.isDeviceSecured, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricPresenter.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricPresenter.kt index f1183d8541..19b1bb2956 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricPresenter.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricPresenter.kt @@ -34,7 +34,7 @@ class SetupBiometricPresenter( val coroutineScope = rememberCoroutineScope() val biometricUnlock = biometricAuthenticatorManager.rememberConfirmBiometricAuthenticator() - fun handleEvents(event: SetupBiometricEvents) { + fun handleEvent(event: SetupBiometricEvents) { when (event) { SetupBiometricEvents.AllowBiometric -> coroutineScope.launch { biometricUnlock.setup() @@ -52,7 +52,7 @@ class SetupBiometricPresenter( return SetupBiometricState( isBiometricSetupDone = isBiometricSetupDone, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenter.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenter.kt index 36065484c7..24cd2b59a0 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenter.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenter.kt @@ -73,7 +73,7 @@ class SetupPinPresenter( } } - fun handleEvents(event: SetupPinEvents) { + fun handleEvent(event: SetupPinEvents) { when (event) { is SetupPinEvents.OnPinEntryChanged -> { // Use the fromConfirmationStep flag from ui to avoid race condition. @@ -106,7 +106,7 @@ class SetupPinPresenter( isConfirmationStep = isConfirmationStep, setupPinFailure = setupPinFailure, appName = buildMeta.applicationName, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt index fc2e61d404..352f3f8055 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt @@ -94,7 +94,7 @@ class PinUnlockPresenter( isUnlocked.value = true } - fun handleEvents(event: PinUnlockEvents) { + fun handleEvent(event: PinUnlockEvents) { when (event) { is PinUnlockEvents.OnPinKeypadPressed -> { pinEntryState.value = pinEntry.process(event.pinKeypadModel) @@ -129,7 +129,7 @@ class PinUnlockPresenter( showBiometricUnlock = biometricUnlock.isActive, biometricUnlockResult = biometricUnlockResult, isUnlocked = isUnlocked.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt index 4df9eb12d5..178dff1062 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt @@ -38,7 +38,7 @@ class ChangeServerPresenter( mutableStateOf(AsyncData.Uninitialized) } - fun handleEvents(event: ChangeServerEvents) { + fun handleEvent(event: ChangeServerEvents) { when (event) { is ChangeServerEvents.ChangeServer -> localCoroutineScope.changeServer(event.accountProvider, changeServerAction) ChangeServerEvents.ClearError -> changeServerAction.value = AsyncData.Uninitialized @@ -47,7 +47,7 @@ class ChangeServerPresenter( return ChangeServerState( changeServerAction = changeServerAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt index d485755afb..8451703ea0 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt @@ -40,7 +40,7 @@ class ConfirmAccountProviderPresenter( val loginMode by loginHelper.collectLoginMode() - fun handleEvents(event: ConfirmAccountProviderEvents) { + fun handleEvent(event: ConfirmAccountProviderEvents) { when (event) { ConfirmAccountProviderEvents.Continue -> { loginHelper.submit( @@ -58,7 +58,7 @@ class ConfirmAccountProviderPresenter( accountProvider = accountProvider, isAccountCreation = params.isAccountCreation, loginMode = loginMode, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/createaccount/CreateAccountPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/createaccount/CreateAccountPresenter.kt index a3aec0eb81..5a0a5cff64 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/createaccount/CreateAccountPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/createaccount/CreateAccountPresenter.kt @@ -50,7 +50,7 @@ class CreateAccountPresenter( val pageProgress: MutableState = remember { mutableIntStateOf(0) } val createAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } - fun handleEvents(event: CreateAccountEvents) { + fun handleEvent(event: CreateAccountEvents) { when (event) { is CreateAccountEvents.SetPageProgress -> { pageProgress.value = event.progress @@ -68,7 +68,7 @@ class CreateAccountPresenter( pageProgress = pageProgress.value, isDebugBuild = buildMeta.isDebuggable, createAction = createAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenter.kt index 80a5711d52..7ea743ed61 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenter.kt @@ -41,7 +41,7 @@ class LoginPasswordPresenter( } val accountProvider by accountProviderDataSource.flow.collectAsState() - fun handleEvents(event: LoginPasswordEvents) { + fun handleEvent(event: LoginPasswordEvents) { when (event) { is LoginPasswordEvents.SetLogin -> updateFormState(formState) { copy(login = event.login) @@ -60,7 +60,7 @@ class LoginPasswordPresenter( accountProvider = accountProvider, formState = formState.value, loginAction = loginAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/qrcode/intro/QrCodeIntroPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/qrcode/intro/QrCodeIntroPresenter.kt index b90e2a6aeb..6c8af76bfb 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/qrcode/intro/QrCodeIntroPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/qrcode/intro/QrCodeIntroPresenter.kt @@ -39,7 +39,7 @@ class QrCodeIntroPresenter( } } - fun handleEvents(event: QrCodeIntroEvents) { + fun handleEvent(event: QrCodeIntroEvents) { when (event) { QrCodeIntroEvents.Continue -> if (cameraPermissionState.permissionGranted) { canContinue = true @@ -55,7 +55,7 @@ class QrCodeIntroPresenter( desktopAppName = buildMeta.desktopApplicationName, cameraPermissionState = cameraPermissionState, canContinue = canContinue, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/qrcode/scan/QrCodeScanPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/qrcode/scan/QrCodeScanPresenter.kt index ed612f2ac3..df206fe7ce 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/qrcode/scan/QrCodeScanPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/qrcode/scan/QrCodeScanPresenter.kt @@ -53,7 +53,7 @@ class QrCodeScanPresenter( authenticationAction.value = AsyncAction.Failure(it) } - fun handleEvents(event: QrCodeScanEvents) { + fun handleEvent(event: QrCodeScanEvents) { when (event) { QrCodeScanEvents.TryAgain -> { isScanning = true @@ -69,7 +69,7 @@ class QrCodeScanPresenter( return QrCodeScanState( isScanning = isScanning, authenticationAction = authenticationAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenter.kt index 657a21111c..6869aef2a1 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenter.kt @@ -45,7 +45,7 @@ class SearchAccountProviderPresenter( onUserInput(userInput, data) } - fun handleEvents(event: SearchAccountProviderEvents) { + fun handleEvent(event: SearchAccountProviderEvents) { when (event) { is SearchAccountProviderEvents.UserInput -> { userInput = event.input @@ -57,7 +57,7 @@ class SearchAccountProviderPresenter( userInput = userInput, userInputResult = data.value, changeServerState = changeServerState, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutPresenter.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutPresenter.kt index 9f3b379372..1c7f7b5879 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutPresenter.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutPresenter.kt @@ -73,7 +73,7 @@ class LogoutPresenter( } } - fun handleEvents(event: LogoutEvents) { + fun handleEvent(event: LogoutEvents) { when (event) { is LogoutEvents.Logout -> { if (logoutAction.value.isConfirming() || event.ignoreSdkError) { @@ -96,7 +96,7 @@ class LogoutPresenter( backupUploadState = backupUploadState, waitingForALongTime = waitingForALongTime, logoutAction = logoutAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DirectLogoutPresenter.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DirectLogoutPresenter.kt index 1e74aa2bc7..bb4c9802bf 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DirectLogoutPresenter.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DirectLogoutPresenter.kt @@ -47,7 +47,7 @@ class DirectLogoutPresenter( val isLastDevice by encryptionService.isLastDevice.collectAsState() - fun handleEvents(event: DirectLogoutEvents) { + fun handleEvent(event: DirectLogoutEvents) { when (event) { is DirectLogoutEvents.Logout -> { if (logoutAction.value.isConfirming() || event.ignoreSdkError) { @@ -66,7 +66,7 @@ class DirectLogoutPresenter( canDoDirectSignOut = !isLastDevice && !backupUploadState.isBackingUp(), logoutAction = logoutAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt index acab975a45..39f9a07faa 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt @@ -221,7 +221,7 @@ class MessagesPresenter( onPauseOrDispose {} } - fun handleEvents(event: MessagesEvents) { + fun handleEvent(event: MessagesEvents) { when (event) { is MessagesEvents.HandleAction -> { localCoroutineScope.handleTimelineAction( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt index 370b3853ea..f53d8afed4 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt @@ -106,7 +106,7 @@ class DefaultActionListPresenter( val isThreadsEnabled = featureFlagService.isFeatureEnabledFlow(FeatureFlags.Threads).collectAsState(false) - fun handleEvents(event: ActionListEvents) { + fun handleEvent(event: ActionListEvents) { when (event) { ActionListEvents.Clear -> target.value = ActionListState.Target.None is ActionListEvents.ComputeForMessage -> localCoroutineScope.computeForMessage( @@ -122,7 +122,7 @@ class DefaultActionListPresenter( return ActionListState( target = target.value, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt index 34a4f12fe5..a3662c9e12 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt @@ -141,7 +141,7 @@ class AttachmentsPreviewPresenter( } } - fun handleEvents(attachmentsPreviewEvents: AttachmentsPreviewEvents) { + fun handleEvent(attachmentsPreviewEvents: AttachmentsPreviewEvents) { when (attachmentsPreviewEvents) { is AttachmentsPreviewEvents.SendAttachment -> { ongoingSendAttachmentJob.value = coroutineScope.launch { @@ -230,7 +230,7 @@ class AttachmentsPreviewPresenter( textEditorState = textEditorState, mediaOptimizationSelectorState = mediaOptimizationSelectorState, displayFileTooLargeError = displayFileTooLargeError, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/crypto/sendfailure/resolve/ResolveVerifiedUserSendFailurePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/crypto/sendfailure/resolve/ResolveVerifiedUserSendFailurePresenter.kt index 54aa26e6ab..f0f8f965cd 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/crypto/sendfailure/resolve/ResolveVerifiedUserSendFailurePresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/crypto/sendfailure/resolve/ResolveVerifiedUserSendFailurePresenter.kt @@ -47,7 +47,7 @@ class ResolveVerifiedUserSendFailurePresenter( } val coroutineScope = rememberCoroutineScope() - fun handleEvents(event: ResolveVerifiedUserSendFailureEvents) { + fun handleEvent(event: ResolveVerifiedUserSendFailureEvents) { when (event) { is ResolveVerifiedUserSendFailureEvents.ComputeForMessage -> { val sendState = event.messageEvent.localSendState as? LocalEventSendState.Failed.VerifiedUser @@ -92,7 +92,7 @@ class ResolveVerifiedUserSendFailurePresenter( verifiedUserSendFailure = verifiedUserSendFailure, resolveAction = resolveAction.value, retryAction = retryAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/link/LinkPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/link/LinkPresenter.kt index 9c4694bafa..a0aa62da56 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/link/LinkPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/link/LinkPresenter.kt @@ -24,7 +24,7 @@ class LinkPresenter( override fun present(): LinkState { val linkClick: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } - fun handleEvents(linkEvents: LinkEvents) { + fun handleEvent(linkEvents: LinkEvents) { when (linkEvents) { is LinkEvents.OnLinkClick -> { linkClick.value = AsyncAction.Loading @@ -48,7 +48,7 @@ class LinkPresenter( } return LinkState( linkClick = linkClick.value, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt index f7dd029826..9ab40349cf 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt @@ -227,7 +227,7 @@ class MessageComposerPresenter( } } - fun handleEvents(event: MessageComposerEvents) { + fun handleEvent(event: MessageComposerEvents) { when (event) { MessageComposerEvents.ToggleFullScreenState -> isFullScreen.value = !isFullScreen.value MessageComposerEvents.CloseSpecialMode -> { @@ -382,7 +382,7 @@ class MessageComposerPresenter( suggestions = suggestions.toImmutableList(), resolveMentionDisplay = resolveMentionDisplay, resolveAtRoomMentionDisplay = resolveAtRoomMentionDisplay, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerPresenter.kt index c0f2cccb6f..193fa10539 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerPresenter.kt @@ -70,7 +70,7 @@ class PinnedMessagesBannerPresenter( expectedPinnedMessagesCount = expectedPinnedMessagesCount, pinnedItems = pinnedItems.value, currentPinnedMessageIndex = currentPinnedMessageIndex, - eventSink = ::handleEvent + eventSink = ::handleEvent, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/list/PinnedMessagesListPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/list/PinnedMessagesListPresenter.kt index 764286ce2e..2c9fb05ef7 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/list/PinnedMessagesListPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/list/PinnedMessagesListPresenter.kt @@ -130,7 +130,7 @@ class PinnedMessagesListPresenter( } ) - fun handleEvents(event: PinnedMessagesListEvents) { + fun handleEvent(event: PinnedMessagesListEvents) { when (event) { is PinnedMessagesListEvents.HandleAction -> sessionCoroutineScope.handleTimelineAction(event.action, event.event) } @@ -143,7 +143,7 @@ class PinnedMessagesListPresenter( displayThreadSummaries = displayThreadSummaries, userEventPermissions = userEventPermissions, timelineItems = pinnedMessageItems, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenter.kt index 90b6585718..efdb4f3895 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenter.kt @@ -53,7 +53,7 @@ class ReportMessagePresenter( var blockUser by rememberSaveable { mutableStateOf(false) } var result: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } - fun handleEvents(event: ReportMessageEvents) { + fun handleEvent(event: ReportMessageEvents) { when (event) { is ReportMessageEvents.UpdateReason -> reason = event.reason ReportMessageEvents.ToggleBlockUser -> blockUser = !blockUser @@ -66,7 +66,7 @@ class ReportMessagePresenter( reason = reason, blockUser = blockUser, result = result.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt index 6f9dab56c8..7607050580 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt @@ -140,7 +140,7 @@ class TimelinePresenter( value = featureFlagService.isFeatureEnabled(FeatureFlags.Threads) } - fun handleEvents(event: TimelineEvents) { + fun handleEvent(event: TimelineEvents) { when (event) { is TimelineEvents.LoadMore -> { if (event.direction == Timeline.PaginationDirection.FORWARDS && timelineMode is Timeline.Mode.Thread) { @@ -289,7 +289,7 @@ class TimelinePresenter( messageShield = messageShield.value, resolveVerifiedUserSendFailureState = resolveVerifiedUserSendFailureState, displayThreadSummaries = displayThreadSummaries, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenter.kt index bbddbb1066..a3502c8af0 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenter.kt @@ -53,7 +53,7 @@ class CustomReactionPresenter( target.value = CustomReactionState.Target.None } - fun handleEvents(event: CustomReactionEvents) { + fun handleEvent(event: CustomReactionEvents) { when (event) { is CustomReactionEvents.ShowCustomReactionSheet -> handleShowCustomReactionSheet(event.event) is CustomReactionEvents.DismissCustomReactionSheet -> handleDismissCustomReactionSheet() @@ -71,7 +71,7 @@ class CustomReactionPresenter( target = target.value, selectedEmoji = selectedEmoji, recentEmojis = recentEmojis, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/picker/EmojiPickerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/picker/EmojiPickerPresenter.kt index ce9600b1f7..41a1d9f73c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/picker/EmojiPickerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/picker/EmojiPickerPresenter.kt @@ -90,7 +90,7 @@ class EmojiPickerPresenter( } val isInPreview = LocalInspectionMode.current - fun handleEvents(event: EmojiPickerEvents) { + fun handleEvent(event: EmojiPickerEvents) { when (event) { // For some reason, in preview mode the SearchBar emits this event with an `isActive = true` value automatically is EmojiPickerEvents.ToggleSearchActive -> if (!isInPreview) { @@ -106,7 +106,7 @@ class EmojiPickerPresenter( searchQuery = searchQuery, isSearchActive = isSearchActive, searchResults = emojiResults, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenter.kt index c3fb43d374..dd6ca16a08 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenter.kt @@ -36,7 +36,7 @@ class ReactionSummaryPresenter( } val targetWithAvatars = populateSenderAvatars(members = membersState.roomMembers().orEmpty().toImmutableList(), summary = target.value) - fun handleEvents(event: ReactionSummaryEvents) { + fun handleEvent(event: ReactionSummaryEvents) { when (event) { is ReactionSummaryEvents.ShowReactionSummary -> target.value = ReactionSummaryState.Summary( reactions = event.reactions.toImmutableList(), @@ -48,7 +48,7 @@ class ReactionSummaryPresenter( } return ReactionSummaryState( target = targetWithAvatars.value, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt index 5136571acd..6c8c04eb6a 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt @@ -96,7 +96,7 @@ class CreatePollPresenter( val scope = rememberCoroutineScope() - fun handleEvents(event: CreatePollEvents) { + fun handleEvent(event: CreatePollEvents) { when (event) { is CreatePollEvents.Save -> scope.launch { if (canSave) { @@ -183,7 +183,7 @@ class CreatePollPresenter( pollKind = poll.pollKind, showBackConfirmation = showBackConfirmation, showDeleteConfirmation = showDeleteConfirmation, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryPresenter.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryPresenter.kt index 15bc803f51..920b53eb41 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryPresenter.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryPresenter.kt @@ -62,7 +62,7 @@ class PollHistoryPresenter( } } val coroutineScope = rememberCoroutineScope() - fun handleEvents(event: PollHistoryEvents) { + fun handleEvent(event: PollHistoryEvents) { when (event) { is PollHistoryEvents.LoadMore -> { coroutineScope.loadMore(timeline) @@ -88,7 +88,7 @@ class PollHistoryPresenter( hasMoreToLoad = paginationState.hasMoreToLoad, pollHistoryItems = pollHistoryItems, activeFilter = activeFilter, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsPresenter.kt index 6378b3038d..f7aa29cd70 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsPresenter.kt @@ -82,7 +82,7 @@ class AdvancedSettingsPresenter( }.collect() } - fun handleEvents(event: AdvancedSettingsEvents) { + fun handleEvent(event: AdvancedSettingsEvents) { when (event) { is AdvancedSettingsEvents.SetDeveloperModeEnabled -> sessionCoroutineScope.launch { appPreferencesStore.setDeveloperModeEnabled(event.enabled) @@ -117,7 +117,7 @@ class AdvancedSettingsPresenter( mediaOptimizationState = mediaOptimizationState, theme = themeOption, mediaPreviewConfigState = mediaPreviewConfigState, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/blockedusers/BlockedUsersPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/blockedusers/BlockedUsersPresenter.kt index 5fbbe3e797..fb2c56f3fe 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/blockedusers/BlockedUsersPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/blockedusers/BlockedUsersPresenter.kt @@ -64,7 +64,7 @@ class BlockedUsersPresenter( } } - fun handleEvents(event: BlockedUsersEvents) { + fun handleEvent(event: BlockedUsersEvents) { when (event) { is BlockedUsersEvents.Unblock -> { pendingUserToUnblock = event.userId @@ -85,7 +85,7 @@ class BlockedUsersPresenter( return BlockedUsersState( blockedUsers = ignoredMatrixUser.toImmutableList(), unblockUserAction = unblockUserAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt index 1e68652e5c..618e63ccae 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt @@ -112,7 +112,7 @@ class DeveloperSettingsPresenter( computeCacheSize(cacheSize) } - fun handleEvents(event: DeveloperSettingsEvents) { + fun handleEvent(event: DeveloperSettingsEvents) { when (event) { is DeveloperSettingsEvents.UpdateEnabledFeature -> coroutineScope.updateEnabledFeature( enabledFeatures = enabledFeatures, @@ -161,7 +161,7 @@ class DeveloperSettingsPresenter( tracingLogPacks = tracingLogPacks, isEnterpriseBuild = enterpriseService.isEnterpriseBuild, showColorPicker = showColorPicker, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt index 00006d1086..e5d02611a5 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt @@ -129,7 +129,7 @@ class NotificationSettingsPresenter( ) } - fun handleEvents(event: NotificationSettingsEvents) { + fun handleEvent(event: NotificationSettingsEvents) { when (event) { is NotificationSettingsEvents.SetAtRoomNotificationsEnabled -> { localCoroutineScope.setAtRoomNotificationsEnabled(event.enabled, changeNotificationSettingAction) @@ -167,7 +167,7 @@ class NotificationSettingsPresenter( availablePushDistributors = availableDistributors, showChangePushProviderDialog = showChangePushProviderDialog, fullScreenIntentPermissionsState = key(refreshFullScreenIntentSettings) { fullScreenIntentPermissionsPresenter.present() }, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt index 25b062827f..c246d0c12c 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt @@ -70,7 +70,7 @@ class EditDefaultNotificationSettingPresenter( displayMentionsOnlyDisclaimer = !notificationSettingsService.canHomeServerPushEncryptedEventsToDevice().getOrDefault(true) } - fun handleEvents(event: EditDefaultNotificationSettingStateEvents) { + fun handleEvent(event: EditDefaultNotificationSettingStateEvents) { when (event) { is EditDefaultNotificationSettingStateEvents.SetNotificationMode -> { localCoroutineScope.setDefaultNotificationMode(event.mode, changeNotificationSettingAction) @@ -85,7 +85,7 @@ class EditDefaultNotificationSettingPresenter( roomsWithUserDefinedMode = roomsWithUserDefinedMode.value.toImmutableList(), changeNotificationSettingAction = changeNotificationSettingAction.value, displayMentionsOnlyDisclaimer = displayMentionsOnlyDisclaimer, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt index 3aa9c61555..e72c0a60e3 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt @@ -100,7 +100,7 @@ class EditUserProfilePresenter( val saveAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val localCoroutineScope = rememberCoroutineScope() - fun handleEvents(event: EditUserProfileEvents) { + fun handleEvent(event: EditUserProfileEvents) { when (event) { is EditUserProfileEvents.Save -> localCoroutineScope.saveChanges( name = userDisplayName, @@ -143,7 +143,7 @@ class EditUserProfilePresenter( saveButtonEnabled = canSave && saveAction.value !is AsyncAction.Loading, saveAction = saveAction.value, cameraPermissionState = cameraPermissionState, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt index 790ecdd092..1a1a4649b2 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt @@ -82,7 +82,7 @@ class BugReportPresenter( } val uploadListener = BugReporterUploadListener(sendingProgress, sendingAction) - fun handleEvents(event: BugReportEvents) { + fun handleEvent(event: BugReportEvents) { when (event) { BugReportEvents.SendBugReport -> { if (formState.value.description.length < 10) { @@ -121,7 +121,7 @@ class BugReportPresenter( sending = sendingAction.value, formState = formState.value, screenshotUri = screenshotUri.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt index 09080e5029..aca6d26297 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt @@ -47,7 +47,7 @@ class DefaultCrashDetectionPresenter( } }.collectAsState(false) - fun handleEvents(event: CrashDetectionEvents) { + fun handleEvent(event: CrashDetectionEvents) { when (event) { CrashDetectionEvents.ResetAllCrashData -> localCoroutineScope.resetAll() CrashDetectionEvents.ResetAppHasCrashed -> localCoroutineScope.resetAppHasCrashed() @@ -57,7 +57,7 @@ class DefaultCrashDetectionPresenter( return CrashDetectionState( appName = buildMeta.applicationName, crashDetected = crashDetected, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/detection/DefaultRageshakeDetectionPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/detection/DefaultRageshakeDetectionPresenter.kt index c6b02d2514..3ca14f102d 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/detection/DefaultRageshakeDetectionPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/detection/DefaultRageshakeDetectionPresenter.kt @@ -48,7 +48,7 @@ class DefaultRageshakeDetectionPresenter( mutableStateOf(false) } - fun handleEvents(event: RageshakeDetectionEvents) { + fun handleEvent(event: RageshakeDetectionEvents) { when (event) { RageshakeDetectionEvents.Disable -> { preferencesState.eventSink(RageshakePreferencesEvents.SetIsEnabled(false)) @@ -67,7 +67,7 @@ class DefaultRageshakeDetectionPresenter( takeScreenshot = takeScreenshot.value, showDialog = showDialog.value, preferenceState = preferencesState, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/preferences/DefaultRageshakePreferencesPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/preferences/DefaultRageshakePreferencesPresenter.kt index 00ca57ea0d..1c34e9400a 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/preferences/DefaultRageshakePreferencesPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/preferences/DefaultRageshakePreferencesPresenter.kt @@ -47,7 +47,7 @@ class DefaultRageshakePreferencesPresenter( rageshakeDataStore.sensitivity() }.collectAsState(initial = 0f) - fun handleEvents(event: RageshakePreferencesEvents) { + fun handleEvent(event: RageshakePreferencesEvents) { when (event) { is RageshakePreferencesEvents.SetIsEnabled -> localCoroutineScope.setIsEnabled(event.isEnabled) is RageshakePreferencesEvents.SetSensitivity -> localCoroutineScope.setSensitivity(event.sensitivity) @@ -59,7 +59,7 @@ class DefaultRageshakePreferencesPresenter( isEnabled = isEnabled, isSupported = isSupported.value, sensitivity = sensitivity, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/reportroom/impl/src/main/kotlin/io/element/android/features/reportroom/impl/ReportRoomPresenter.kt b/features/reportroom/impl/src/main/kotlin/io/element/android/features/reportroom/impl/ReportRoomPresenter.kt index 42ab1cf08a..8109aa0d8b 100644 --- a/features/reportroom/impl/src/main/kotlin/io/element/android/features/reportroom/impl/ReportRoomPresenter.kt +++ b/features/reportroom/impl/src/main/kotlin/io/element/android/features/reportroom/impl/ReportRoomPresenter.kt @@ -43,7 +43,7 @@ class ReportRoomPresenter( val coroutineScope = rememberCoroutineScope() - fun handleEvents(event: ReportRoomEvents) { + fun handleEvent(event: ReportRoomEvents) { when (event) { ReportRoomEvents.Report -> coroutineScope.reportRoom(reason, leaveRoom, reportAction) ReportRoomEvents.ToggleLeaveRoom -> { @@ -61,7 +61,7 @@ class ReportRoomPresenter( reason = reason, leaveRoom = leaveRoom, reportAction = reportAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/roomaliasresolver/impl/src/main/kotlin/io/element/android/features/roomaliasresolver/impl/RoomAliasResolverPresenter.kt b/features/roomaliasresolver/impl/src/main/kotlin/io/element/android/features/roomaliasresolver/impl/RoomAliasResolverPresenter.kt index c8a8d18fbc..8714bf9891 100644 --- a/features/roomaliasresolver/impl/src/main/kotlin/io/element/android/features/roomaliasresolver/impl/RoomAliasResolverPresenter.kt +++ b/features/roomaliasresolver/impl/src/main/kotlin/io/element/android/features/roomaliasresolver/impl/RoomAliasResolverPresenter.kt @@ -44,7 +44,7 @@ class RoomAliasResolverPresenter( resolveAlias(resolveState) } - fun handleEvents(event: RoomAliasResolverEvents) { + fun handleEvent(event: RoomAliasResolverEvents) { when (event) { RoomAliasResolverEvents.Retry -> coroutineScope.resolveAlias(resolveState) RoomAliasResolverEvents.DismissError -> resolveState.value = AsyncData.Uninitialized @@ -54,7 +54,7 @@ class RoomAliasResolverPresenter( return RoomAliasResolverState( roomAlias = roomAlias, resolveState = resolveState.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsPresenter.kt index ccb4c48e7e..4c0467cee1 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsPresenter.kt @@ -136,7 +136,7 @@ class RoomDetailsPresenter( val snackbarDispatcher = LocalSnackbarDispatcher.current val snackbarMessage by snackbarDispatcher.collectSnackbarMessageAsState() - fun handleEvents(event: RoomDetailsEvent) { + fun handleEvent(event: RoomDetailsEvent) { when (event) { is RoomDetailsEvent.LeaveRoom -> { leaveRoomState.eventSink(LeaveRoomEvent.LeaveRoom(room.roomId, needsConfirmation = event.needsConfirmation)) @@ -204,7 +204,7 @@ class RoomDetailsPresenter( canReportRoom = canReportRoom, isTombstoned = roomInfo.successorRoom != null, showDebugInfo = isDeveloperModeEnabled, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditPresenter.kt index cc207d8b24..fc9fa32be5 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditPresenter.kt @@ -140,7 +140,7 @@ class RoomDetailsEditPresenter( val saveAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val localCoroutineScope = rememberCoroutineScope() - fun handleEvents(event: RoomDetailsEditEvents) { + fun handleEvent(event: RoomDetailsEditEvents) { when (event) { is RoomDetailsEditEvents.Save -> localCoroutineScope.saveChanges( currentNameTrimmed = roomRawNameTrimmed, @@ -191,7 +191,7 @@ class RoomDetailsEditPresenter( saveButtonEnabled = saveButtonEnabled, saveAction = saveAction.value, cameraPermissionState = cameraPermissionState, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListPresenter.kt index 90619d2e2d..b1cefd2537 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListPresenter.kt @@ -159,7 +159,7 @@ class RoomMemberListPresenter( } } - fun handleEvents(event: RoomMemberListEvents) { + fun handleEvent(event: RoomMemberListEvents) { when (event) { is RoomMemberListEvents.OnSearchActiveChanged -> isSearchActive = event.active is RoomMemberListEvents.UpdateSearchQuery -> searchQuery = event.query @@ -179,7 +179,7 @@ class RoomMemberListPresenter( isSearchActive = isSearchActive, canInvite = canInvite, moderationState = roomModerationState, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsPresenter.kt index 7bfdf9949c..4e5b57e7e5 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsPresenter.kt @@ -99,7 +99,7 @@ class RoomNotificationSettingsPresenter( !notificationSettingsService.canHomeServerPushEncryptedEventsToDevice().getOrDefault(true) } - fun handleEvents(event: RoomNotificationSettingsEvents) { + fun handleEvent(event: RoomNotificationSettingsEvents) { when (event) { is RoomNotificationSettingsEvents.ChangeRoomNotificationMode -> { localCoroutineScope.setRoomNotificationMode(event.mode, pendingRoomNotificationMode, pendingSetDefault, setNotificationSettingAction) @@ -135,7 +135,7 @@ class RoomNotificationSettingsPresenter( setNotificationSettingAction = setNotificationSettingAction.value, restoreDefaultAction = restoreDefaultAction.value, displayMentionsOnlyDisclaimer = shouldDisplayMentionsOnlyDisclaimer, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyPresenter.kt index 4ff45bb588..fb552077fe 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyPresenter.kt @@ -107,7 +107,7 @@ class SecurityAndPrivacyPresenter( var showEnableEncryptionConfirmation by remember(savedSettings.isEncrypted) { mutableStateOf(false) } val permissions by room.securityAndPrivacyPermissionsAsState(syncUpdateFlow.value) - fun handleEvents(event: SecurityAndPrivacyEvents) { + fun handleEvent(event: SecurityAndPrivacyEvents) { when (event) { SecurityAndPrivacyEvents.Save -> { coroutineScope.save( @@ -158,7 +158,7 @@ class SecurityAndPrivacyPresenter( isKnockEnabled = isKnockEnabled, saveAction = saveAction.value, permissions = permissions, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) // If the history visibility is not available for the current access, use the fallback. diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressPresenter.kt index 95aee73c13..badb40e331 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressPresenter.kt @@ -62,7 +62,7 @@ class EditRoomAddressPresenter( ) } - fun handleEvents(event: EditRoomAddressEvents) { + fun handleEvent(event: EditRoomAddressEvents) { when (event) { EditRoomAddressEvents.Save -> coroutineScope.save( saveAction = saveAction, @@ -92,7 +92,7 @@ class EditRoomAddressPresenter( roomAddressValidity = roomAddressValidity.value, roomAddress = newRoomAddress, saveAction = saveAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/roomdirectory/impl/src/main/kotlin/io/element/android/features/roomdirectory/impl/root/RoomDirectoryPresenter.kt b/features/roomdirectory/impl/src/main/kotlin/io/element/android/features/roomdirectory/impl/root/RoomDirectoryPresenter.kt index 4696dd4263..77f7203368 100644 --- a/features/roomdirectory/impl/src/main/kotlin/io/element/android/features/roomdirectory/impl/root/RoomDirectoryPresenter.kt +++ b/features/roomdirectory/impl/src/main/kotlin/io/element/android/features/roomdirectory/impl/root/RoomDirectoryPresenter.kt @@ -62,7 +62,7 @@ class RoomDirectoryPresenter( loadingMore = false } } - fun handleEvents(event: RoomDirectoryEvents) { + fun handleEvent(event: RoomDirectoryEvents) { when (event) { RoomDirectoryEvents.LoadMore -> { loadingMore = true @@ -77,7 +77,7 @@ class RoomDirectoryPresenter( query = searchQuery.orEmpty(), roomDescriptions = listState.items, displayLoadMoreIndicator = listState.hasMoreToLoad, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt index aa1de8fde9..54ea35e7f0 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt @@ -36,7 +36,7 @@ class SecureBackupDisablePresenter( Timber.tag(loggerTagDisable.value).d("backupState: $backupState") val disableAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val coroutineScope = rememberCoroutineScope() - fun handleEvents(event: SecureBackupDisableEvents) { + fun handleEvent(event: SecureBackupDisableEvents) { when (event) { is SecureBackupDisableEvents.DisableBackup -> coroutineScope.disableBackup(disableAction) SecureBackupDisableEvents.DismissDialogs -> { @@ -49,7 +49,7 @@ class SecureBackupDisablePresenter( backupState = backupState, disableAction = disableAction.value, appName = buildMeta.applicationName, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenter.kt index b56a4542b0..0bf73a3322 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenter.kt @@ -44,7 +44,7 @@ class SecureBackupEnterRecoveryKeyPresenter( mutableStateOf(AsyncAction.Uninitialized) } - fun handleEvents(event: SecureBackupEnterRecoveryKeyEvents) { + fun handleEvent(event: SecureBackupEnterRecoveryKeyEvents) { when (event) { SecureBackupEnterRecoveryKeyEvents.ClearDialog -> { submitAction.value = AsyncAction.Uninitialized @@ -78,7 +78,7 @@ class SecureBackupEnterRecoveryKeyPresenter( ), isSubmitEnabled = recoveryKey.isNotEmpty() && submitAction.value.isUninitialized(), submitAction = submitAction.value, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/reset/password/ResetIdentityPasswordPresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/reset/password/ResetIdentityPasswordPresenter.kt index 26a6ae1fac..648a2cc7f9 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/reset/password/ResetIdentityPasswordPresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/reset/password/ResetIdentityPasswordPresenter.kt @@ -39,7 +39,7 @@ class ResetIdentityPasswordPresenter( return ResetIdentityPasswordState( resetAction = resetAction.value, - eventSink = ::handleEvent + eventSink = ::handleEvent, ) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/reset/root/ResetIdentityRootPresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/reset/root/ResetIdentityRootPresenter.kt index 909cdc1379..6b357cec8d 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/reset/root/ResetIdentityRootPresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/reset/root/ResetIdentityRootPresenter.kt @@ -28,7 +28,7 @@ class ResetIdentityRootPresenter : Presenter { return ResetIdentityRootState( displayConfirmationDialog = displayConfirmDialog, - eventSink = ::handleEvent + eventSink = ::handleEvent, ) } } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenter.kt index 67ec1c9960..7ecd056e4f 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenter.kt @@ -58,7 +58,7 @@ class SecureBackupRootPresenter( } } - fun handleEvents(event: SecureBackupRootEvents) { + fun handleEvent(event: SecureBackupRootEvents) { when (event) { SecureBackupRootEvents.RetryKeyBackupState -> localCoroutineScope.getKeyBackupStatus(doesBackupExistOnServerAction) SecureBackupRootEvents.EnableKeyStorage -> localCoroutineScope.enableBackup(enableAction) @@ -78,7 +78,7 @@ class SecureBackupRootPresenter( appName = buildMeta.applicationName, displayKeyStorageDisabledError = displayKeyStorageDisabledError, snackbarMessage = snackbarMessage, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupPresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupPresenter.kt index 58a6c4b43c..a9b60c23a2 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupPresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupPresenter.kt @@ -52,7 +52,7 @@ class SecureBackupSetupPresenter( } var showSaveConfirmationDialog by remember { mutableStateOf(false) } - fun handleEvents(event: SecureBackupSetupEvents) { + fun handleEvent(event: SecureBackupSetupEvents) { when (event) { SecureBackupSetupEvents.CreateRecoveryKey -> { coroutineScope.createOrChangeRecoveryKey(stateAndDispatch) @@ -81,7 +81,7 @@ class SecureBackupSetupPresenter( recoveryKeyViewState = recoveryKeyViewState, setupState = setupState, showSaveConfirmationDialog = showSaveConfirmationDialog, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/share/impl/src/main/kotlin/io/element/android/features/share/impl/SharePresenter.kt b/features/share/impl/src/main/kotlin/io/element/android/features/share/impl/SharePresenter.kt index f5ce67498e..6d7011c4a7 100644 --- a/features/share/impl/src/main/kotlin/io/element/android/features/share/impl/SharePresenter.kt +++ b/features/share/impl/src/main/kotlin/io/element/android/features/share/impl/SharePresenter.kt @@ -55,7 +55,7 @@ class SharePresenter( @Composable override fun present(): ShareState { - fun handleEvents(event: ShareEvents) { + fun handleEvent(event: ShareEvents) { when (event) { ShareEvents.ClearError -> shareActionState.value = AsyncAction.Uninitialized } @@ -63,7 +63,7 @@ class SharePresenter( return ShareState( shareAction = shareActionState.value, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/signedout/impl/src/main/kotlin/io/element/android/features/signedout/impl/SignedOutPresenter.kt b/features/signedout/impl/src/main/kotlin/io/element/android/features/signedout/impl/SignedOutPresenter.kt index 7c9d1e6d83..ee7ad1831e 100644 --- a/features/signedout/impl/src/main/kotlin/io/element/android/features/signedout/impl/SignedOutPresenter.kt +++ b/features/signedout/impl/src/main/kotlin/io/element/android/features/signedout/impl/SignedOutPresenter.kt @@ -42,7 +42,7 @@ class SignedOutPresenter( }.collectAsState(initial = null) val coroutineScope = rememberCoroutineScope() - fun handleEvents(event: SignedOutEvents) { + fun handleEvent(event: SignedOutEvents) { when (event) { SignedOutEvents.SignInAgain -> coroutineScope.launch { sessionStore.removeSession(sessionId.value) @@ -53,7 +53,7 @@ class SignedOutPresenter( return SignedOutState( appName = buildMeta.applicationName, signedOutSession = signedOutSession, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/leave/LeaveSpacePresenter.kt b/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/leave/LeaveSpacePresenter.kt index 19e593bf7c..1433e17e92 100644 --- a/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/leave/LeaveSpacePresenter.kt +++ b/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/leave/LeaveSpacePresenter.kt @@ -97,7 +97,7 @@ class LeaveSpacePresenter( } } - fun handleEvents(event: LeaveSpaceEvents) { + fun handleEvent(event: LeaveSpaceEvents) { when (event) { LeaveSpaceEvents.Retry -> { leaveSpaceRooms = AsyncData.Loading() @@ -134,7 +134,7 @@ class LeaveSpacePresenter( isLastAdmin = leaveSpaceRooms.dataOrNull()?.current?.isLastAdmin == true, selectableSpaceRooms = selectableSpaceRooms, leaveSpaceAction = leaveSpaceAction.value, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpacePresenter.kt b/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpacePresenter.kt index 58f5c8f5fb..a8b8e3a080 100644 --- a/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpacePresenter.kt +++ b/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpacePresenter.kt @@ -93,7 +93,7 @@ class SpacePresenter( val acceptDeclineInviteState = acceptDeclineInvitePresenter.present() - fun handleEvents(event: SpaceEvents) { + fun handleEvent(event: SpaceEvents) { when (event) { SpaceEvents.LoadMore -> localCoroutineScope.paginate() is SpaceEvents.Join -> { @@ -128,7 +128,7 @@ class SpacePresenter( joinActions = joinActions.toImmutableMap(), acceptDeclineInviteState = acceptDeclineInviteState, topicViewerState = topicViewerState, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/startchat/impl/src/main/kotlin/io/element/android/features/startchat/impl/joinbyaddress/JoinRoomByAddressPresenter.kt b/features/startchat/impl/src/main/kotlin/io/element/android/features/startchat/impl/joinbyaddress/JoinRoomByAddressPresenter.kt index 350a59de73..5acb0629f7 100644 --- a/features/startchat/impl/src/main/kotlin/io/element/android/features/startchat/impl/joinbyaddress/JoinRoomByAddressPresenter.kt +++ b/features/startchat/impl/src/main/kotlin/io/element/android/features/startchat/impl/joinbyaddress/JoinRoomByAddressPresenter.kt @@ -48,7 +48,7 @@ class JoinRoomByAddressPresenter( var internalAddressState by remember { mutableStateOf(RoomAddressState.Unknown) } var validateAddress: Boolean by remember { mutableStateOf(false) } - fun handleEvents(event: JoinRoomByAddressEvents) { + fun handleEvent(event: JoinRoomByAddressEvents) { when (event) { JoinRoomByAddressEvents.Continue -> { when (val currentState = internalAddressState) { @@ -88,7 +88,7 @@ class JoinRoomByAddressPresenter( return JoinRoomByAddressState( address = address, addressState = addressState, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/startchat/impl/src/main/kotlin/io/element/android/features/startchat/impl/root/StartChatPresenter.kt b/features/startchat/impl/src/main/kotlin/io/element/android/features/startchat/impl/root/StartChatPresenter.kt index 10a9745f32..c683125caf 100644 --- a/features/startchat/impl/src/main/kotlin/io/element/android/features/startchat/impl/root/StartChatPresenter.kt +++ b/features/startchat/impl/src/main/kotlin/io/element/android/features/startchat/impl/root/StartChatPresenter.kt @@ -57,7 +57,7 @@ class StartChatPresenter( featureFlagService.isFeatureEnabledFlow(FeatureFlags.RoomDirectorySearch) }.collectAsState(initial = false) - fun handleEvents(event: StartChatEvents) { + fun handleEvent(event: StartChatEvents) { when (event) { is StartChatEvents.StartDM -> localCoroutineScope.launch { startDMAction.execute( @@ -75,7 +75,7 @@ class StartChatPresenter( userListState = userListState, startDmAction = startDmActionState.value, isRoomDirectorySearchEnabled = isRoomDirectorySearchEnabled, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/root/UserProfilePresenter.kt b/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/root/UserProfilePresenter.kt index 3f226d0213..9efff65d9d 100644 --- a/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/root/UserProfilePresenter.kt +++ b/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/root/UserProfilePresenter.kt @@ -99,7 +99,7 @@ class UserProfilePresenter( } val userProfile by produceState(null) { value = client.getProfile(userId).getOrNull() } - fun handleEvents(event: UserProfileEvents) { + fun handleEvent(event: UserProfileEvents) { when (event) { is UserProfileEvents.BlockUser -> { if (event.needsConfirmation) { @@ -151,7 +151,7 @@ class UserProfilePresenter( dmRoomId = dmRoomId, canCall = canCall, snackbarMessage = null, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/incoming/IncomingVerificationPresenter.kt b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/incoming/IncomingVerificationPresenter.kt index 176176a895..38918314f6 100644 --- a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/incoming/IncomingVerificationPresenter.kt +++ b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/incoming/IncomingVerificationPresenter.kt @@ -107,7 +107,7 @@ class IncomingVerificationPresenter( } } - fun handleEvents(event: IncomingVerificationViewEvents) { + fun handleEvent(event: IncomingVerificationViewEvents) { Timber.d("Verification user action: ${event::class.simpleName}") when (event) { IncomingVerificationViewEvents.StartVerification -> @@ -141,7 +141,7 @@ class IncomingVerificationPresenter( return IncomingVerificationState( step = step, request = verificationRequest, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/outgoing/OutgoingVerificationPresenter.kt b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/outgoing/OutgoingVerificationPresenter.kt index c985c15e36..9b3906606b 100644 --- a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/outgoing/OutgoingVerificationPresenter.kt +++ b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/outgoing/OutgoingVerificationPresenter.kt @@ -92,7 +92,7 @@ class OutgoingVerificationPresenter( observeVerificationService() } - fun handleEvents(event: OutgoingVerificationViewEvents) { + fun handleEvent(event: OutgoingVerificationViewEvents) { Timber.d("Verification user action: ${event::class.simpleName}") when (event) { // Just relay the event to the state machine @@ -109,7 +109,7 @@ class OutgoingVerificationPresenter( return OutgoingVerificationState( step = step, request = verificationRequest, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/libraries/fullscreenintent/impl/src/main/kotlin/io/element/android/libraries/fullscreenintent/impl/FullScreenIntentPermissionsPresenter.kt b/libraries/fullscreenintent/impl/src/main/kotlin/io/element/android/libraries/fullscreenintent/impl/FullScreenIntentPermissionsPresenter.kt index b05aad303c..be483b0683 100644 --- a/libraries/fullscreenintent/impl/src/main/kotlin/io/element/android/libraries/fullscreenintent/impl/FullScreenIntentPermissionsPresenter.kt +++ b/libraries/fullscreenintent/impl/src/main/kotlin/io/element/android/libraries/fullscreenintent/impl/FullScreenIntentPermissionsPresenter.kt @@ -63,7 +63,7 @@ class FullScreenIntentPermissionsPresenter( val isGranted = notificationManagerCompat.canUseFullScreenIntent() val isBannerDismissed by isFullScreenIntentBannerDismissed.collectAsState(initial = true) - fun handleEvents(event: FullScreenIntentPermissionsEvents) { + fun handleEvent(event: FullScreenIntentPermissionsEvents) { when (event) { FullScreenIntentPermissionsEvents.Dismiss -> coroutineScope.launch { dismissFullScreenIntentBanner() @@ -75,7 +75,7 @@ class FullScreenIntentPermissionsPresenter( return FullScreenIntentPermissionsState( permissionGranted = isGranted, shouldDisplayBanner = !isBannerDismissed && !isGranted, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/MediaGalleryPresenter.kt b/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/MediaGalleryPresenter.kt index 3f8a31cc26..955acfe7ec 100644 --- a/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/MediaGalleryPresenter.kt +++ b/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/MediaGalleryPresenter.kt @@ -82,7 +82,7 @@ class MediaGalleryPresenter( val snackbarMessage by snackbarDispatcher.collectSnackbarMessageAsState() localMediaActions.Configure() - fun handleEvents(event: MediaGalleryEvents) { + fun handleEvent(event: MediaGalleryEvents) { when (event) { is MediaGalleryEvents.ChangeMode -> { mode = event.mode @@ -150,7 +150,7 @@ class MediaGalleryPresenter( groupedMediaItems = groupedMediaItems, mediaBottomSheetState = mediaBottomSheetState, snackbarMessage = snackbarMessage, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/viewer/MediaViewerPresenter.kt b/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/viewer/MediaViewerPresenter.kt index a04a1a370a..ea560a0b6a 100644 --- a/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/viewer/MediaViewerPresenter.kt +++ b/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/viewer/MediaViewerPresenter.kt @@ -90,7 +90,7 @@ class MediaViewerPresenter( } localMediaActions.Configure() - fun handleEvents(event: MediaViewerEvents) { + fun handleEvent(event: MediaViewerEvents) { when (event) { is MediaViewerEvents.LoadMedia -> { coroutineScope.downloadMedia(data = event.data) @@ -163,7 +163,7 @@ class MediaViewerPresenter( snackbarMessage = snackbarMessage, canShowInfo = inputs.canShowInfo, mediaBottomSheetState = mediaBottomSheetState, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } diff --git a/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/DefaultPermissionsPresenter.kt b/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/DefaultPermissionsPresenter.kt index c6bfbd73ed..e157aa56f5 100644 --- a/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/DefaultPermissionsPresenter.kt +++ b/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/DefaultPermissionsPresenter.kt @@ -99,7 +99,7 @@ class DefaultPermissionsPresenter( val showDialog = rememberSaveable { mutableStateOf(false) } - fun handleEvents(event: PermissionsEvents) { + fun handleEvent(event: PermissionsEvents) { when (event) { PermissionsEvents.CloseDialog -> { showDialog.value = false @@ -125,7 +125,7 @@ class DefaultPermissionsPresenter( showDialog = showDialog.value, permissionAlreadyAsked = isAlreadyAsked, permissionAlreadyDenied = isAlreadyDenied, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/battery/BatteryOptimizationPresenter.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/battery/BatteryOptimizationPresenter.kt index 3c876ece1d..6bff2092e0 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/battery/BatteryOptimizationPresenter.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/battery/BatteryOptimizationPresenter.kt @@ -47,7 +47,7 @@ class BatteryOptimizationPresenter( onPauseOrDispose {} } - fun handleEvents(event: BatteryOptimizationEvents) { + fun handleEvent(event: BatteryOptimizationEvents) { when (event) { BatteryOptimizationEvents.Dismiss -> coroutineScope.launch { mutableBatteryOptimizationStore.onOptimizationBannerDismissed() @@ -66,7 +66,7 @@ class BatteryOptimizationPresenter( return BatteryOptimizationState( shouldDisplayBanner = localShouldDisplayBanner && storeShouldDisplayBanner && !isSystemIgnoringBatteryOptimizations, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt index 841b955018..b6546784ea 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt @@ -63,7 +63,7 @@ class RoomSelectPresenter( } } - fun handleEvents(event: RoomSelectEvents) { + fun handleEvent(event: RoomSelectEvents) { when (event) { is RoomSelectEvents.SetSelectedRoom -> { selectedRooms = persistentListOf(event.room) @@ -87,7 +87,7 @@ class RoomSelectPresenter( query = searchQuery, isSearchActive = isSearchActive, selectedRooms = selectedRooms, - eventSink = ::handleEvents, + eventSink = ::handleEvent, ) } } diff --git a/libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenter.kt b/libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenter.kt index 07840b023c..d410d85973 100644 --- a/libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenter.kt +++ b/libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenter.kt @@ -37,7 +37,7 @@ class TroubleshootNotificationsPresenter( } val testSuiteState by troubleshootTestSuite.state.collectAsState() - fun handleEvents(event: TroubleshootNotificationsEvents) { + fun handleEvent(event: TroubleshootNotificationsEvents) { when (event) { TroubleshootNotificationsEvents.StartTests -> coroutineScope.launch { troubleshootTestSuite.runTestSuite(this) @@ -57,7 +57,7 @@ class TroubleshootNotificationsPresenter( return TroubleshootNotificationsState( testSuiteState = testSuiteState, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } } diff --git a/libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/history/PushHistoryPresenter.kt b/libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/history/PushHistoryPresenter.kt index b98fcee970..db2885e2d5 100644 --- a/libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/history/PushHistoryPresenter.kt +++ b/libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/history/PushHistoryPresenter.kt @@ -61,7 +61,7 @@ class PushHistoryPresenter( var resetAction: AsyncAction by remember { mutableStateOf(AsyncAction.Uninitialized) } var showNotSameAccountError by remember { mutableStateOf(false) } - fun handleEvents(event: PushHistoryEvents) { + fun handleEvent(event: PushHistoryEvents) { when (event) { is PushHistoryEvents.SetShowOnlyErrors -> { showOnlyErrors = event.showOnlyErrors @@ -97,7 +97,7 @@ class PushHistoryPresenter( showOnlyErrors = showOnlyErrors, resetAction = resetAction, showNotSameAccountError = showNotSameAccountError, - eventSink = ::handleEvents + eventSink = ::handleEvent, ) } }