Snackbar: Use a private SnackbarDispatcher() to ensure the Snackbar is displayed in the current screen (#4128)
This commit is contained in:
parent
84eed48b7d
commit
2676dafd1d
2 changed files with 3 additions and 4 deletions
|
|
@ -44,7 +44,6 @@ class MediaViewerPresenter @AssistedInject constructor(
|
|||
@Assisted private val dataSource: MediaViewerDataSource,
|
||||
private val room: MatrixRoom,
|
||||
private val localMediaActions: LocalMediaActions,
|
||||
private val snackbarDispatcher: SnackbarDispatcher,
|
||||
) : Presenter<MediaViewerState> {
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
|
|
@ -55,6 +54,9 @@ class MediaViewerPresenter @AssistedInject constructor(
|
|||
): MediaViewerPresenter
|
||||
}
|
||||
|
||||
// Use a local snackbarDispatcher because this presenter is used in an Overlay Node
|
||||
private val snackbarDispatcher = SnackbarDispatcher()
|
||||
|
||||
@Composable
|
||||
override fun present(): MediaViewerState {
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue