(bug): Critical error thrown in gallery permissions logic.

Summary

When a user tries to access their gallery for the first time, they are sometimes met with a critical error.

Steps to reproduce

  • Reset permissions or reinstall app
  • Try to access your gallery (post attachment is probably the easiest way)

Platform information

S7 Edge (8.0.0) / app v3.3.0

What is the current bug behavior?

User is shown a critical error

What is the expected correct behavior?

User should be prompted for permission for the app to access gallery

Relevant logs and/or screenshots

Wire_2019-04-02_at_20.44.31

Wire_2019-04-02_at_20.44.35

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by Ben