Rename handleEvents to handleEvent
This commit is contained in:
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -100,7 +100,7 @@ class EditUserProfilePresenter(
|
||||
|
||||
val saveAction: MutableState<AsyncAction<Unit>> = 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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user