* Perform preference schema upgrades at startup
Over time it can be desirable to change how preferences are interpreted.
Preferences might be removed, or renamed. Or the default value for a
preference might be changed.
When this happens it's important that users upgrading from one version to
the next (or jumping from one version to several versions ahead) get a
consistent experience. In particular:
- Preferences that no longer exist should be deleted
- Preferences that have been renamed should have the old preference values
copied over
- If the user used the default value for the preference, and the default has
changed, the previous default value should be explicitly set as their
value for the preference
To support this, store a SCHEMA_VERSION as a preference. This is not exposed
to the user, and corresponds to the app's VERSION_CODE.
If the version code does not match the schema version then this is a newer
version of the app with older preferences that may need to be changed.
Those changes will be implemented in `upgradeSharedPreferences`.
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
* Translated using Weblate (Ukrainian)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
* Translated using Weblate (Vietnamese)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
* Translated using Weblate (Belarusian)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Mikalai <mikalai.hryb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky
* Translated using Weblate (Belarusian)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Andrej Zabavin <andre.zabavin@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky
* Translated using Weblate (Belarusian)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Mikalai <mikalai.hryb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky
* Translated using Weblate (Belarusian)
Currently translated at 100.0% (552 of 552 strings)
Translated using Weblate (Belarusian)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: xzFantom <xzfantom@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky
* Translated using Weblate (Japanese)
Currently translated at 91.3% (504 of 552 strings)
Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ja/
Translation: Tusky/Tusky
* Translated using Weblate (Icelandic)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
* Translated using Weblate (Belarusian)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Mikalai <mikalai.hryb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky
* Lint
---------
Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Co-authored-by: Mikalai <mikalai.hryb@gmail.com>
Co-authored-by: Andrej Zabavin <andre.zabavin@gmail.com>
Co-authored-by: xzFantom <xzfantom@gmail.com>
Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Verified by enabling "Pointer Location" in the developer options, and then experimenting to see which angles trigger opens of the nav. drawer, and in a stock "Tabbed Activity" generated in Android Studio (New > Activity > Tabbed Activity) that uses ViewPager2.
Currently translated at 99.1% (555 of 560 strings)
Translated using Weblate (Swedish)
Currently translated at 98.0% (549 of 560 strings)
Co-authored-by: Elias Mårtenson <elias@dhsdevelopments.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sv/
Translation: Tusky/Tusky
Currently translated at 99.8% (559 of 560 strings)
Co-authored-by: Grzegorz Cichocki <grzegorz.cichocki@pollub.edu.pl>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pl/
Translation: Tusky/Tusky
Currently translated at 100.0% (560 of 560 strings)
Translated using Weblate (Welsh)
Currently translated at 100.0% (560 of 560 strings)
Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
Currently translated at 83.0% (465 of 560 strings)
Translated using Weblate (Spanish)
Currently translated at 94.1% (527 of 560 strings)
Translated using Weblate (Basque)
Currently translated at 78.5% (440 of 560 strings)
Translated using Weblate (Basque)
Currently translated at 78.5% (440 of 560 strings)
Translated using Weblate (Basque)
Currently translated at 78.5% (440 of 560 strings)
Translated using Weblate (Basque)
Currently translated at 78.5% (440 of 560 strings)
Co-authored-by: Aitor Salaberria <trslbrr@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/es/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/eu/
Translation: Tusky/Tusky
* First attempt at user notifications of failure when media upload fails
* Drafts alert displays alert
* ktLint
* Fix defaced 46.json, add 47.json
* Mock draftsNeedUserAlert in MainActivityTest to prevent spurious failure
* Friendlier posts-failed message
* Create DraftsAlert object
* DraftsAlert works
* Not the cleanest, but DraftsAlert works with multiple accounts
* Use plural strings
* KtLint
* Clean up debug prints
* Simplify DraftsAlert per Conny suggestions
* Text change suggested by Conny
* ktLint again
* Back out test changes
* Fix MainActivityTest for new approach
* Tweak debug log
* Do not use GlobalScope for coroutines
* Check for status "type" before casting.
* Update app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadViewModel.kt
Co-authored-by: Nik Clayton <nik@ngo.org.uk>
* Make sure no placeholder is returned as status
---------
Co-authored-by: Nik Clayton <nik@ngo.org.uk>
Currently translated at 88.4% (488 of 552 strings)
Translated using Weblate (Latvian)
Currently translated at 86.7% (479 of 552 strings)
Translated using Weblate (Latvian)
Currently translated at 84.4% (466 of 552 strings)
Co-authored-by: Mārtiņš Bruņenieks <martinsb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translation: Tusky/Tusky
Currently translated at 100.0% (555 of 555 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
* Reinstate optional login via custom browser tab
* Clarify the buttons for the different login options
* Add informative labels for the different login options
* Move "Login with Browser" to the options menu
MIME type detection for files based on extensions (the `getType()` method)
returns incorrect results from DownloadProvider and FileProvider for (at
least) .m4a files.
Investigation details are in https://github.com/tuskyapp/Tusky/issues/3189
Be safe, and use `MediaMetadataRetriever` to sniff the content of the files
to determine the correct type.
Fixes https://github.com/tuskyapp/Tusky/issues/3189
Currently translated at 100.0% (552 of 552 strings)
Translated using Weblate (Belarusian)
Currently translated at 100.0% (552 of 552 strings)
Co-authored-by: xzFantom <xzfantom@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky