Rename handleEvents to handleEvent

This commit is contained in:
Benoit Marty 2025-11-07 12:20:33 +01:00
parent 6acd0ed687
commit 7ad9c8f687
94 changed files with 182 additions and 182 deletions

View file

@ -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,
)
}

View file

@ -140,7 +140,7 @@ class RoomDetailsEditPresenter(
val saveAction: MutableState<AsyncAction<Unit>> = 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,
)
}

View file

@ -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,
)
}

View file

@ -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,
)
}

View file

@ -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.

View file

@ -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,
)
}