tuskyapp / Tusky

An Android client for the microblogging server Mastodon
https://tusky.app
GNU General Public License v3.0
2.47k stars 390 forks source link

continue uploading media after sending post #4662

Closed connyduck closed 2 weeks ago

connyduck commented 2 weeks ago

regression from https://github.com/tuskyapp/Tusky/pull/4599

https://pug.ninja/@motoridersd/113102603349423738

The problem is, MediaUploader is no longer a singleton, so the state is not correctly shared between ComposeActivity and SendStatusService. But it can't be a singleton, since MediaUploadApi (injected into MediaUploader) needs to be recreated on account change. Let's share the state in the companion object instead.