mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Rename handleEvents to handleEvent
This commit is contained in:
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -61,7 +61,7 @@ class PushHistoryPresenter(
|
||||
var resetAction: AsyncAction<Unit> 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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user