Merge pull request #5698 from element-hq/feature/bma/handleEvent

Code consistency around view event handling
This commit is contained in:
Benoit Marty 2025-11-10 09:36:04 +01:00 committed by GitHub
commit 8769b98862
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
105 changed files with 260 additions and 250 deletions

View file

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