openhab-android
openhab-android copied to clipboard
Fix icons sometimes not being loaded correctly
When scrolling through a widget list, an icon WidgetImageView sometimes goes through a lifecycle like this 1 onAttachedToWindow 2 onLayout 3 onDetachedFromWindow 4 onAttachedToWindow 5 onLayout
If step 2 saw a pending load job and launched a coroutine to execute it, it could happen that step 3 canceled the coroutine scope before the coroutine was executed. Make sure not to forget about the pending request, so it's reexecuted in step 5.
Looks like this still doesn't suffice. Icon loading is better with it, but still I sometimes get permanent loading indication (skeleton). I'll investigate more.
I'll investigate more.
Do you want to get this merged anyway?
It probably makes sense, yes. It's certainly better now, and I also believe the change itself is correct.
Is this the same as https://github.com/openhab/openhab-android/issues/3747 for sitemaps?
Can cancelling the coroutine⇔HTTP request in OH-Android lead to this error on the server: https://github.com/openhab/openhab-core/issues/4792? I do see it pretty often.
Maybe. You can check it in version 3.17.12-beta.