Merge pull request #5698 from element-hq/feature/bma/handleEvent
Code consistency around view event handling
This commit is contained in:
commit
8769b98862
105 changed files with 260 additions and 250 deletions
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue