Add full screen intent permissions banner (#3024)

* Add full screen intent permissions banner, creating `:libraries:fullscreenintent` modules.
* Add it to notification settings too:
    - Create `libraries:fullscreenintent` modules for the permission presenter and associated data.
    - Add the presenter and states to `NotificationSettingsPresenter` and `NotificationSettingsView`.
* Use the right API to check for full screen intent permissions.
- Use the right package name for `:libraries:permission` contents.
* Fix broken tests (flaky?)
* Ignore coverage verification for fake and small presenters

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Jorge Martin Espinosa 2024-06-18 09:41:10 +02:00 committed by GitHub
parent 7322c75a67
commit feef0f6976
163 changed files with 867 additions and 48 deletions

View file

@ -20,12 +20,14 @@ import androidx.compose.runtime.Composable
import io.element.android.libraries.permissions.api.PermissionsPresenter
import io.element.android.libraries.permissions.api.PermissionsState
class NoopPermissionsPresenter : PermissionsPresenter {
class NoopPermissionsPresenter(
private val isGranted: Boolean = false,
) : PermissionsPresenter {
@Composable
override fun present(): PermissionsState {
return PermissionsState(
permission = "",
permissionGranted = false,
permissionGranted = isGranted,
shouldShowRationale = false,
showDialog = false,
permissionAlreadyAsked = false,

View file

@ -41,7 +41,7 @@ class FakePermissionsPresenter(
}
fun setPermissionDenied() {
state.value = state.value.copy(permissionAlreadyDenied = true)
state.value = state.value.copy(permissionGranted = false, permissionAlreadyDenied = true)
}
@Composable