Fix blocking permission requests by cyb3rko · Pull Request #314 · gotify/android
I've realized that this line
| installSplashScreen().setKeepOnScreenCondition { splashScreenActive } |
is blocking the UI thread until the condition is true. Because permission requests take some seconds the app is blocking for several seconds, even leading to possible app crashes.
The solution is canceling the splashScreen when requesting permissions and showing the previous "splash screen layout".
Tested on Android 13 (33) and 14 (34).