Tusky-App-Android/app
Konrad Pozniak 75c42cb5c1
prevent MainActivity from leaking through the DrawerImageLoader singleton (#4153)
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.)
2023-12-10 09:44:53 +01:00
..
schemas/com.keylesspalace.tusky.db.AppDatabase 3532: Show badge on conversations tab on new conversations (#3890) 2023-10-15 21:39:38 +02:00
src prevent MainActivity from leaking through the DrawerImageLoader singleton (#4153) 2023-12-10 09:44:53 +01:00
build.gradle Release 115 (24.0) 2023-12-05 20:19:35 +01:00
getGitSha.gradle Previous attempt to fix git sha on non-git build broke git build. (#3322) 2023-02-16 20:20:52 +01:00
lint-baseline.xml Fix lint warnings (#4019) 2023-09-13 09:20:53 +02:00
lint.xml Make linting failures opt-in instead of opt-out 2023-09-07 14:20:30 +02:00
proguard-rules.pro Remove shrinker rules for okhttp (#3560) 2023-04-24 12:08:03 +02:00