Loading of statuses and loading of filters is an "intended" race:
we want to display statuses first, especially if they are cached.
Unfortunately we do not cache filters themselves so when we load cached
statuses we do not apply filters.
One part of the solution is to re-filter the statuses once we fetch the
filters. This commit implements it. Caching of filters is not included
yet.
* Fix unintended [mismatched] show-replies preference and add a comment to prevent confusion.
* Change the key on TAB_FILTER_HOME_REPLIES to reset everyone's value here once.
Currently translated at 98.7% (482 of 488 strings)
Co-authored-by: Luca <f5e54431-cf3e-4a72-afcd-66ad76a38c19@anonaddy.me>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
Currently translated at 97.7% (477 of 488 strings)
Translated using Weblate (Portuguese (Portugal))
Currently translated at 98.1% (477 of 486 strings)
Co-authored-by: Bruno Miguel <brunoalexandremiguel@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
Currently translated at 100.0% (488 of 488 strings)
Translated using Weblate (Hungarian)
Currently translated at 99.5% (484 of 486 strings)
Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky
Currently translated at 99.5% (486 of 488 strings)
Translated using Weblate (Gaelic)
Currently translated at 99.5% (483 of 485 strings)
Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
Currently translated at 100.0% (488 of 488 strings)
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (486 of 486 strings)
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (485 of 485 strings)
Co-authored-by: Vegard Skjefstad <vegard@vegard.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nb_NO/
Translation: Tusky/Tusky
Currently translated at 98.7% (479 of 485 strings)
Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fr/
Translation: Tusky/Tusky
Currently translated at 100.0% (488 of 488 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (486 of 486 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (485 of 485 strings)
Co-authored-by: Hồ Nhất Duy <kantcer@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (488 of 488 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (486 of 486 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (485 of 485 strings)
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
Currently translated at 100.0% (485 of 485 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (485 of 485 strings)
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
* First attachment crop attempt: Can crop in place, but does not delete/replace on server so has no effect
* Attachment crop feature works
* ktlint fixes on attachment crop patch
* Upgrade Android-Image-Cropper to 4.2.1
* An error message should be displayed if attachment cropping fails and it is not because the user intentionally cancelled.
* Remove 2 of the 3 "state passing" variables by using MediaUtils
* Cropper should use content uri (MIME type bearing) and setOutputCompressFormat so that PNGs reach the server safely.
* Change to crop requested by Conny: Store inflight cropImageItemOld in view model
* Change to crop requested by Conny: Sort cropImage with the other contracts
* ktlint fixes on attachment crop patch (again)
* Show account's creation date in Profile.
* Fix broken test.
* Store account creation date in the Database.
* Reformat and reposition Joined Date according to PR Feedback.
* Revert "Store account creation date in the Database."
This reverts commit d9761f53 as it's not needed.
* Change Account's Creation Date to a java.util.Date.
Update Test.
* Fix wildcard import.
* Show full month instead of an abbreviation.
* Remove `lazy` usage in favor of local instantiation.
Co-authored-by: Martin Marconcini <martin.marconcini.rodriguez@nl.abnamro.com>
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
Fixes#793.
This is an implementation for push notifications based on UnifiedPush
for Tusky. No push gateway (other than UP itself) is needed, since
UnifiedPush is simple enough such that it can act as a catch-all
endpoint for WebPush messages. When a UnifiedPush distributor is present
on-device, we will by default register Tusky as a receiver; if no
UnifiedPush distributor is available, then pull notifications are used
as a fallback mechanism.
Because WebPush messages are encrypted, and Mastodon does not send the
keys and IV needed for decryption in the request body, for now the push
handler simply acts as a trigger for the pre-existing NotificationWorker
which is also used for pull notifications. Nevertheless, I have
implemented proper key generation and storage, just in case we would
like to implement full decryption support in the future when Mastodon
upgrades to the latest WebPush encryption scheme that includes all
information in the request body.
For users with existing accounts, push notifications will not be enabled
until all of the accounts have been re-logged in to grant the new push
OAuth scope. A small prompt will be shown (until dismissed) as a
Snackbar to explain to the user about this, and an option is added in
Account Preferences to facilitate re-login without deleting local drafts
and cache.
Currently translated at 99.5% (477 of 479 strings)
Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fr/
Translation: Tusky/Tusky
Currently translated at 100.0% (479 of 479 strings)
Translated using Weblate (Gaelic)
Currently translated at 100.0% (479 of 479 strings)
Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
Currently translated at 100.0% (478 of 478 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (478 of 478 strings)
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
Currently translated at 100.0% (478 of 478 strings)
Co-authored-by: idontwanttohaveausername <bydlanm@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Italian)
Currently translated at 96.6% (461 of 477 strings)
Co-authored-by: Stefano Pigozzi <me@steffo.eu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
Previously we simply closed the screen with the login WebView which
could cause confusion. Now we specify that page could not be loaded.
As a side effect it will also show the error message which the server
returns (if any).
* Set TextIsSelectable on the corresponding view holders and remove a longpress listener to let Android select text.
* Revert changes, and make selectable text only in detailed status.
Remove long press listener to copy to clipboard (as it interferes with natural text selection on Android).
* Remove unused string (copy_to_clipboard_success) from all translations.
Co-authored-by: Martin Marconcini <martin.marconcini.rodriguez@nl.abnamro.com>
* make MastodonApi.createStatus suspending
* check if media processing has finished before sending status
* add backoff for retrying processed media check
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Gaelic)
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Gaelic)
Currently translated at 100.0% (477 of 477 strings)
Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Hungarian)
Currently translated at 100.0% (477 of 477 strings)
Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky
* Add back the emojiInitCallback and move EmojiCompat init
* Small adjustments
* Make sure that we don't hit the IllegalStateException when EmojiCompat-ing the display names
* Add a TODO for when Material Drawer 9 can be used
* Remove EmojiCompat.process and initcallback
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Gaelic)
Currently translated at 100.0% (477 of 477 strings)
Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Hungarian)
Currently translated at 100.0% (477 of 477 strings)
Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky
* Update to Emoji2
* Hopefully fix the emoji picker preference
* Switch to released Filemojicompat version
* Filemojicompat version as an own var
* Remove an unused import
* Small cleanup
* Correct onDisplayPreferenceDialog; test TuskyApplication
* Use TextViews instead of EmojiTextViews
* Recreate the Main Activity if the emoji pack is updated
* Enable coreLibraryDesugaring (for Java Streams); update Filemojicompat, downgrade Emoji2
* Update emoji font versions to 14
* Use FilemojiCompat 3.2.0-beta01
* Make ktLint happy again
* Remove coreLibraryDesugaring and a FIXME
* Use EmojiPickerPreference.get()
* Disable emoji pack import
* Update FilemojiCompat to Beta 2
* Update FilemojiCompat to Beta 3
* Update FilemojiCompat to Beta 3.2.0 final
* Update FilemojiCompat to 3.2.1
Currently translated at 99.3% (474 of 477 strings)
Translated using Weblate (Gaelic)
Currently translated at 100.0% (473 of 473 strings)
Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (473 of 473 strings)
Co-authored-by: Hồ Nhất Duy <kantcer@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (473 of 473 strings)
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
Currently translated at 100.0% (477 of 477 strings)
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (473 of 473 strings)
Co-authored-by: Vegard Skjefstad <vegard@vegard.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nb_NO/
Translation: Tusky/Tusky
Currently translated at 93.0% (440 of 473 strings)
Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
* guard against the status of a notification being null in rare cases
* improve code, fix bug when payloads is not null
* remove findViewById
* add comments in NotificationsAdapter
* refactor compose & announcements to coroutines
* fix code formatting
* add javadoc to InstanceInfoRepository
* fix comments in ImageDownsizer
* remove unused Either extensions
* add explicit return type for InstanceInfoRepository.getEmojis
* make ComposeViewModel.pickMedia return Result
* cleanup code in ImageDownsizer
* Improve time format of posts when using absolute time
* fix AbsoluteTimeFormatter, add tests
* fix tests
Co-authored-by: Conny Duck <k.pozniak@gmx.at>
* fix black theme on Android 12
* Revert "fix black theme on Android 12"
This reverts commit 2286706fdb239e15be72ac8943405ffeb2258219.
* bring back SplashActivity
Currently translated at 100.0% (469 of 469 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (469 of 469 strings)
Co-authored-by: Hồ Nhất Duy <kantcer@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (469 of 469 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (469 of 469 strings)
Co-authored-by: Hồ Nhất Duy <kantcer@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (469 of 469 strings)
Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
Currently translated at 100.0% (469 of 469 strings)
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
Currently translated at 100.0% (468 of 468 strings)
Co-authored-by: Hồ Nhất Duy <kantcer@gmail.com>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (468 of 468 strings)
Co-authored-by: sphoneix <simone.pugliese21@gmail.com>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/it/
Translation: Tusky/Tusky
Currently translated at 100.0% (468 of 468 strings)
Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/fr/
Translation: Tusky/Tusky
Currently translated at 100.0% (468 of 468 strings)
Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
* Improve login process with newer APIs
* Implement login with WebView instead of browser tab or external browser
Oauth process requires us to open login prompt for correct instance and
we need to receive the result back. Usually it is done with redirect
parameter.
Previously we've been using BrowserTabs API and have been falling back
to just opening browser. This mostly worked but is very clumsy:
- It relies on few system mechanisms for opening URLs in both
directions
- Browsers do weird things and tend to break quite a bit
- There's a good chance that the app can die in the process and we need
to recover our state.
So instead we are now using WebView. It has disadvantages (users have
to trust us to show correct page, logins are not shared w/ browser) but
it should be more reliable.
* Changes to login after review
* Move login classes to their own package
* Fix linting issues
Currently translated at 100.0% (468 of 468 strings)
Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/is/
Translation: Tusky/Tusky
Currently translated at 100.0% (468 of 468 strings)
Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
Currently translated at 100.0% (468 of 468 strings)
Co-authored-by: Hồ Nhất Duy <kantcer@gmail.com>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (468 of 468 strings)
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
Currently translated at 100.0% (468 of 468 strings)
Translated using Weblate (Occitan)
Currently translated at 97.2% (455 of 468 strings)
Translated using Weblate (Arabic)
Currently translated at 98.9% (463 of 468 strings)
Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/ar/
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/fr/
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
Currently translated at 100.0% (462 of 462 strings)
Co-authored-by: Jonathan Soares <vsrw5bfj@duck.com>
Translate-URL: https://"weblate.tusky.app"/projects/tusky/tusky/pt_BR/
Translation: Tusky/Tusky
* update Android Image Cropper and get rid of deprecated onActivityResult
* add comment why skipping caches is necessary
* inject application into EditProfileViewModel instead of passing it everytime