75c42cb5c1
Another fix for a memory leak. This one is not as big as #4150, but still worth fixing for memory constrained devices imo. The `DrawerImageLoader` implementation (a global singleton) references a member of the `MainActivity`, causing the whole activity to leak. This weird construct was introduced in #1989 to fix a crash, but I think since we migrated to coroutines it is no longer necessary because all calls get correctly cancelled. I tried reproducing the crash but could not, so I'm pretty sure it is fine. I would appreciate it if someone else could try it as well though. (The crash could be reproduced on slow internet, when `onFetchUserInfoSuccess` was called while the activity was being destroyed, causing Glide to crash the app because it can't use destroyed activities. `onFetchUserInfoSuccess` is now no longer called in this case because it is inside a `lifecycleScope.launch` block.) |
||
---|---|---|
.. | ||
schemas/com.keylesspalace.tusky.db.AppDatabase | ||
src | ||
build.gradle | ||
getGitSha.gradle | ||
lint-baseline.xml | ||
lint.xml | ||
proguard-rules.pro |