-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite PermissionsActivity
, PermissionsFragment
to Compose
#583
Rewrite PermissionsActivity
, PermissionsFragment
to Compose
#583
Conversation
app/src/main/kotlin/at/bitfire/davdroid/ui/PermissionsFragment.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
f68d13a
to
37b45e7
Compare
…nsfragment-to-compose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks basically good but what I'm missing is the on/off status text for every permission. I think they're necessary because they contain recommendations and users can't know what for instance Keep permissions means.
I also wonder whether there's a better method to be notified when auto-revoke permissions is changed, other than onResume()
. But I couldn't find anything else …
I have also done a few minor changes (see commit).
I've also been searching for something, and it doesn't seem to be much. The only thing I've found is maybe using the |
…nsfragment-to-compose
@ArnyminerZ Can you add the on/off text? We can merge it then I think |
…nsfragment-to-compose
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok there's still a problem. In the old version we had a TasksWatcher
, which updates the permission rows when a tasks app is (un)installed.
The current accompanist permissions approach doesn't update the rows = re-evaluate these lines:
val openTasksAvailable = pm.resolveContentProvider(ProviderName.OpenTasks.authority, 0) != null
val tasksOrgAvailable = pm.resolveContentProvider(ProviderName.TasksOrg.authority, 0) != null
val jtxAvailable = pm.resolveContentProvider(ProviderName.JtxBoard.authority, 0) != null
when a tasks app is (un)installed.
Steps to reproduce:
- Open PermissionsActivity
- Switch to Play Store, install jtx Board, let it install in background
- While it's installing, switch back to PermissionsActivity
- PermissionsActivity is not updated when app is installed (jtx Board row doesn't appear)
Expected: the row should appear as soon as the app is installed.
Maybe re-evaluating the code could be triggered by a LiveData value from the model (something like "List" which is driven by the TasksWatcher)?
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
…nsfragment-to-compose
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
I think this should work fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good now!
No description provided.