Be able to test PermissionsPresenterTest. Create interface to abstract Accompanist implementation
This commit is contained in:
parent
d8b37d6ead
commit
000ed480ee
7 changed files with 254 additions and 11 deletions
|
|
@ -19,5 +19,4 @@ package io.element.android.libraries.permissions.api
|
|||
sealed interface PermissionsEvents {
|
||||
object OpenSystemDialog : PermissionsEvents
|
||||
object CloseDialog : PermissionsEvents
|
||||
object OpenSystemSettings : PermissionsEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ fun PermissionsView(
|
|||
content = "In order to let the application display notification, please grant the permission to the system settings",
|
||||
submitText = "Open settings",
|
||||
onSubmitClicked = {
|
||||
state.eventSink.invoke(PermissionsEvents.OpenSystemSettings)
|
||||
state.eventSink.invoke(PermissionsEvents.CloseDialog)
|
||||
openSystemSettings()
|
||||
},
|
||||
onDismiss = { state.eventSink.invoke(PermissionsEvents.CloseDialog) },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue