element-android icon indicating copy to clipboard operation
element-android copied to clipboard

Mutualize the pending auth handling (PSG-742)

Open mnaturel opened this issue 2 years ago • 2 comments

Type of change

  • [ ] Feature
  • [ ] Bugfix
  • [x] Technical
  • [ ] Other :

Content

Creation of a new class PendingAuthHandler to mutualize the handling of pending auth for actions which require authentication. It was previously used in several ViewModel. I am doing this refactor to be able to test this and because we will need it for sign out action in the new device management screens.

Motivation and context

Closes #7193

Screenshots / GIFs

Tests

  • Go to a screen using re-auth for example the device manager screen
  • Go to settings -> Security & Privacy -> Show all sessions
  • Long press on of your devices
  • Press the sign out action
  • Check the authentication flow is working well

Tested devices

  • [ ] Physical
  • [x] Emulator
  • OS version(s): Android 11

Checklist

  • [ ] Changes has been tested on an Android device or Android emulator with API 21
  • [ ] UI change has been tested on both light and dark themes
  • [ ] Accessibility has been taken into account. See https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#accessibility
  • [x] Pull request is based on the develop branch
  • [x] Pull request includes a new file under ./changelog.d. See https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#changelog
  • [ ] Pull request includes screenshots or videos if containing UI changes
  • [ ] Pull request includes a sign off
  • [x] You've made a self review of your PR
  • [ ] If you have modified the screen flow, or added new screens to the application, you have updated the test UiAllScreensSanityTest.allScreensTest()

mnaturel avatar Sep 22 '22 08:09 mnaturel

Thanks for reducing code duplication, and adding tests!

bmarty avatar Sep 22 '22 09:09 bmarty