Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
shannon-livefront committed Aug 1, 2024
1 parent a00c9ca commit 349b837
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package com.x8bit.bitwarden.ui.platform.base.util
/**
* Almost all the events in the app involve navigation or toasts. To prevent accidentally
* navigating to the same view twice, by default, events are ignored if the view is not currently
* resumed. To avoid that restriction, specific events can conform to [BackgroundEvent].
* resumed. To avoid that restriction, specific events can implement [BackgroundEvent].
*/
interface BackgroundEvent
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import kotlinx.coroutines.flow.onEach

/**
* Convenience method for observing event flow from [BaseViewModel].
*
* By default, events will only be consumed when the associated screen is
* resumed, to avoid bugs like duplicate navigation calls. To override
* this behavior, a given event type can implement [BackgroundEvent].
*/
@Composable
fun <E> EventsEffect(
Expand Down

0 comments on commit 349b837

Please sign in to comment.