moezbhatti / qksms

The most beautiful SMS messenger for Android
https://qklabs.com/download
GNU General Public License v3.0
4.42k stars 1.06k forks source link

Confusing loading state in Battery Saver #1993

Open graciouselectric opened 1 month ago

graciouselectric commented 1 month ago

DESCRIPTION

Dear developer,

I noticed that, when I enable Battery Saver on Android 8.1, the indeterminate ProgressBars in the app are not properly shown. This is a known problem in Android API level <28, see e.g. this StackOverflow question. Battery Saver disables animations, also on progress bars on these versions. This is quite confusing because the loading state is not properly represented. It is fixed in later Android versions, where progress bars do appear and animate.

Looking at the code, indeterminate progress bars are created here:

className='com.moez.QKSMS.feature.settings.SettingsController', lineNumber=203
className='com.moez.QKSMS.feature.settings.SettingsController', lineNumber=178
className='com.moez.QKSMS.feature.backup.BackupController', lineNumber=163
className='com.moez.QKSMS.feature.main.MainActivity', lineNumber=299

To fix this issue, one can check ValueAnimator.areAnimatorsEnabled() and provide a different UI element, such as a text label, when animations are disabled.

STEPS

  1. Open conversations list

or

  1. Sync messages

EXPECTED

The progress bar animates, showing that I need to wait, or an alternative progress UI is shown.

OBSERVATIONS

The progress bar is frozen

I also recorded a video, showing the issue in practice:

https://github.com/moezbhatti/qksms/assets/165037835/22412189-ffdb-4809-bc76-bdd79f42793f