Commit Graph

3575 Commits

Author SHA1 Message Date
Lakoja 0d1340781b 3530: Add help text for empty lists view. 2023-08-07 09:44:58 +02:00
Lakoja c9f59aace4 3530: Provide a help text on the empty conversations view 2023-08-07 09:44:58 +02:00
Nik Clayton 846289b8cc
Add support for setting a list's "exclusivity" option (#3932)
Fixes #3831
2023-08-06 20:29:34 +02:00
Mike Barnes 6766509977
Use case-insensitive checks when comparing account URLs in search (#3931)
Fixes #3929
2023-08-06 13:45:48 +02:00
Angelo Suzuki a84d7f56a0
Filters> Tabs: use checkbox instead of switch (#3927)
Nowhere else in the preferences are checkboxes used.

Also removed the now unused extension function.

Fixes #3535
2023-08-06 11:50:11 +02:00
Hồ Nhất Duy ef8afe02b6 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-08-06 11:48:49 +02:00
Eric bfe907f4f6 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-08-06 11:48:49 +02:00
Quentí 48a88dea9e Translated using Weblate (Occitan)
Currently translated at 99.0% (610 of 616 strings)

Co-authored-by: Quentí <quentinantonin@free.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
2023-08-06 11:48:49 +02:00
Danial Behzadi 51370cc22f Translated using Weblate (Persian)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-08-06 11:48:49 +02:00
puf f3bbfa90fc Translated using Weblate (Welsh)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-08-06 11:48:49 +02:00
UlrichKu cb8a09d3f7
Officially rename error elephant to errorphant (#3922)
In honor of
https://strangeobject.space/@esther/109866090382540100
https://masto.ai/@mynotaurus/110826349670549779
2023-08-05 15:39:07 +02:00
Nik Clayton d5e2ce9608
Use colorPrimary for the "edit" schedule icon (#3917)
The "edit" icon when showing a scheduled status' time was grey, so it's
not obvious that this section is clickable.

Use colorPrimary, so it looks more like a button.
2023-08-04 13:37:31 +02:00
Nik Clayton f5b89f855f
Show the correct tab title when opening the activity (#3915)
The previous code used `notificationTabPosition`, which was never
changed, so always 0.

This meant that if you e.g., got to `MainActivity` by clicking on a
notification, and the notification tab was current, the title would
still show "Home".

Fix that by using the existing `position` variable which represents the
currently selected tab, and ensure the correct title is shown.

Fixes #3864.
2023-08-03 21:49:19 +02:00
Ümit Solmaz 79b637c97a Translated using Weblate (Turkish)
Currently translated at 100.0% (610 of 610 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2023-08-03 14:30:32 +02:00
puf 1f18f3e786 Translated using Weblate (Welsh)
Currently translated at 100.0% (610 of 610 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-08-03 14:30:32 +02:00
Nik Clayton 9cda091d03
Show additional bug report info in AboutActivity (#3802)
Make it easier for people to find information we need for a bug report,
and show it on AboutActivity.

New info is:

- Device manufacturer (e.g., "Google") and model (e.g., "Pixel 4a (5G)")
- Android version (e.g., "13")
- SDK version (e.g., "33")
- Active account (e.g., "@Tusky@mastodon.social")
- Server's version (e.g., "4.1.2+nightly-20230627")

All info is copyable to make it easy to include in a bug report. A
button to copy the information is also shown.
2023-08-03 12:20:35 +02:00
Goooler 40bd95d752
Kotlin 1.9.0 (#3835)
Update to Kotlin 1.9.0 and migrate to newer language idioms.

- Remove unnecessary @OptIn for features migrated to mainstream
- Use `data object` where appropriate
- Use new enum `entries` property
2023-08-02 09:04:24 +02:00
Suguru Hirahara 5391b5f797 Translated using Weblate (Japanese)
Currently translated at 97.7% (596 of 610 strings)

Co-authored-by: Suguru Hirahara <marveled_whitcomb@hostux.ninja>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ja/
Translation: Tusky/Tusky
2023-07-31 14:22:23 +02:00
Nik Clayton 79ee2dc32c
Fix image zoom / pan / scroll / swipe (#3894)
Migrate to touchimageview from photoview, and adjust the touch logic to correctly handle single finger drag, two finger pinch/stretch, flings, taps, and swipes.

As before, the features are:

- Single tap, show/hide controls and media description
- Double tap, zoom in/out
- Single finger drag up/down, scale/translate image, dismiss if scrolled too far
- Single finger drag left/right
  - When not zoomed, swipe to next image if multiple images present
- When zoomed, scroll to edge of image, then to next image if multiple images present
- Two finger pinch/zoom, zoom in/out on the image

Behaviour differences to previous code

1. Bug fix: The image can't get "stuck" when zoomed, and impossible to scroll
2. Bug fix: Pinching is not mis-interpreted as a fling, closing the image
3. Bug fix: The zoom state of images is not lost or misinterpreted when the user swipes through multiple images
4. Bug fix: Double-tap zooms all the way, instead of stopping
5. Tapping outside the image does not dismiss it, controls and description show/hide

Fixes https://github.com/tuskyapp/Tusky/issues/3562, https://github.com/tuskyapp/Tusky/issues/2297
2023-07-31 12:44:01 +02:00
Connyduck 0f74a6b3dc Added translation using Weblate (Hebrew)
Co-authored-by: Connyduck <weblate@connyduck.at>
2023-07-30 15:30:24 +02:00
Yannis D b5bed897c6 Translated using Weblate (Greek)
Currently translated at 17.2% (105 of 610 strings)

Co-authored-by: Yannis D <i.doganos@tutamail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/el/
Translation: Tusky/Tusky
2023-07-29 12:53:03 +02:00
XoseM b58219f8cf Translated using Weblate (Galician)
Currently translated at 100.0% (610 of 610 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2023-07-29 12:53:03 +02:00
Hồ Nhất Duy fb94585a85 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (610 of 610 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-07-29 12:53:03 +02:00
Ihor Hordiichuk c4a7532ee5 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (610 of 610 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2023-07-29 12:53:03 +02:00
Eric 18dfc39bd1 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (610 of 610 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-07-29 12:53:03 +02:00
Danial Behzadi 31af6c3e0c Translated using Weblate (Persian)
Currently translated at 100.0% (610 of 610 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-07-29 12:53:03 +02:00
Konrad Pozniak 97713b06da
Always update the filter display, even when the list is empty (#3880)
Fixes #3839, https://github.com/tuskyapp/Tusky/issues/3525
2023-07-27 13:44:28 +02:00
Ihor Hordiichuk 500271d4b3 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2023-07-27 13:07:46 +02:00
Konrad Pozniak ee711598c7
Cache locked state of connected accounts (#3790)
Small improvement to the behavior on bad/disconnected networks

Fixes https://github.com/tuskyapp/Tusky/issues/3773
2023-07-27 00:09:26 +02:00
Nik Clayton e852aa64a5
Show the throwable error message when an upload fails (#3838) 2023-07-26 23:36:29 +02:00
Nik Clayton 406152d5b9
Clear listeners, hide icons when appropriate (#3870)
Preferences are shown using view holders.

The previous code did not clear the listeners or hide the icons if
necessary.

The practical upshot of this was that if you had two or more slider
preferences, *and* they were situated more than a screen's height apart,
the viewholder from the first one would get reused.

And if the first one enabled icons then the second one would show them.
And clicking on the second one would also call the listeners for the
first one.
2023-07-26 17:00:08 +02:00
Sveinn í Felli 9824694b86 Translated using Weblate (Icelandic)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
2023-07-24 21:48:21 +02:00
UlrichKu e4c2476f34
Retain text in search view when switching tabs before first search (#3540)
Fixes #3527
2023-07-19 11:40:08 +02:00
XoseM 1287614c2e Translated using Weblate (Galician)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2023-07-19 10:10:57 +02:00
Ümit Solmaz 9f6c86a880 Translated using Weblate (Turkish)
Currently translated at 99.8% (608 of 609 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2023-07-19 10:10:57 +02:00
Rhoslyn Prys 9ada8bad92 Translated using Weblate (Welsh)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Rhoslyn Prys <post@meddal.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-07-19 10:10:57 +02:00
GunChleoc d500858b00 Translated using Weblate (Gaelic)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
2023-07-19 10:10:57 +02:00
Konrad Pozniak f3e0ee56df
Check for empty trending response (#3853)
Fixes #3852
2023-07-19 09:39:07 +02:00
Levi Bard a75131246f
update rick roll domains (#3850) 2023-07-13 22:21:11 +02:00
Conny Duck 45e604a194 update rick roll domains 2023-07-13 22:07:03 +02:00
Nik Clayton b17d3a5042
Set statusView width/height to match_parent (#3844)
Fixes an issue where the view's width is only enough to wrap the image,
resulting in a very narrow view that obscures the text of the error.
2023-07-13 17:26:12 +02:00
Oliebol 1421d46797 Translated using Weblate (Dutch)
Currently translated at 96.5% (588 of 609 strings)

Co-authored-by: Oliebol <schrijfmedan@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nl/
Translation: Tusky/Tusky
2023-07-12 12:54:46 +02:00
Hồ Nhất Duy 828f50d5c4 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (609 of 609 strings)

Translated using Weblate (Vietnamese)

Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-07-12 12:54:46 +02:00
Sotolf Flasskjegg f5ffe3cb52 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Sotolf Flasskjegg <trym.karlsen@protonmail.ch>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nb_NO/
Translation: Tusky/Tusky
2023-07-11 16:29:06 +02:00
Eric 1ed527ef02 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-07-11 16:29:06 +02:00
Danial Behzadi cc88e38123 Translated using Weblate (Persian)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-07-11 16:29:06 +02:00
Connyduck f53c1c60c6 Translated using Weblate (German)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Connyduck <weblate@connyduck.at>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-07-11 16:29:06 +02:00
XoseM 6f2b9db076 Translated using Weblate (Galician)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2023-07-11 16:29:06 +02:00
Hồ Nhất Duy 0b4a02a2a9 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-07-11 16:29:06 +02:00
Konrad Pozniak 0f18253ce2
Clarify that logging out deletes local data (#3832)
Fixes #3417
2023-07-10 12:10:22 +02:00
Nik Clayton 0d88f26bb3
Display the list's title in the array adapter (#3823)
Fixes #3819
2023-07-08 21:08:37 +02:00
Nik Clayton 3406abcbb3 Translated using Weblate (Italian)
Currently translated at 99.1% (604 of 609 strings)

Co-authored-by: Nik Clayton <nik@ngo.org.uk>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Santiago Kozak 5019b47e0a Translated using Weblate (Spanish)
Currently translated at 99.3% (605 of 609 strings)

Co-authored-by: Santiago Kozak <kozaksantiago@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/es/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Sotolf Flasskjegg 8c0f1ef45d Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Sotolf Flasskjegg <trym.karlsen@protonmail.ch>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nb_NO/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
TAKAHASHI Shuuji 6546672bb7 Translated using Weblate (Japanese)
Currently translated at 96.5% (588 of 609 strings)

Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ja/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Ümit Solmaz 3e2e5995e3 Translated using Weblate (Turkish)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Gera, Zoltan 6de49e5970 Translated using Weblate (Hungarian)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Deleted User 255629af5a Translated using Weblate (German)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Deleted User <noreply+289@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
GunChleoc 5664d3f20a Translated using Weblate (Gaelic)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Luna Jernberg 8b6182464e Translated using Weblate (Swedish)
Currently translated at 100.0% (609 of 609 strings)

Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sv/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Manuel 58bb6ed403 Translated using Weblate (Italian)
Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: Manuel <mannivuwiki@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Hồ Nhất Duy 518cf505d2 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (609 of 609 strings)

Translated using Weblate (Vietnamese)

Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Eric 22c1589a62 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (609 of 609 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Oliebol a0fc40874b Translated using Weblate (Dutch)
Currently translated at 97.3% (588 of 604 strings)

Co-authored-by: Oliebol <schrijfmedan@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nl/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Danial Behzadi 03887c9dea Translated using Weblate (Persian)
Currently translated at 100.0% (609 of 609 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (609 of 609 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-07-07 21:38:23 +02:00
Nik Clayton 480d412e4c
Set default alt-text to media label when pasting images (#3800)
GBoard and other IME's support pasting images, which are converted to attachments.

Sometimes these have labels that describe the image. If present, set it as the default alt-text.

Fixes #3799
2023-07-07 18:50:19 +02:00
Konrad Pozniak c0cf5b2f0d
Fix caption dialog context menu background (#3787)
Fixes #3770, #3491
2023-07-07 15:10:15 +02:00
Nik Clayton 3c90f22b84
Fix ArrayIndexOutOfBoundsException (#3808)
Fixes https://github.com/tuskyapp/Tusky/issues/3807
2023-07-06 19:57:35 +02:00
Nik Clayton 121db1713d
Fix lint issues in AppDatabase.java (#3809) 2023-07-06 19:37:51 +02:00
Conny Duck c84815525f ui improvements 2023-07-05 20:11:12 +02:00
Conny Duck f8a6e0d8b8 introduce DomainBlocksRepository 2023-07-05 20:09:16 +02:00
Conny Duck 8e56b5429b introduce SnackbarEvent instead of DomainBlockEvent 2023-07-05 19:42:30 +02:00
Conny Duck 2393ff1e4d rename item_muted_domain to item_blocked_domain 2023-07-05 19:23:04 +02:00
Conny Duck 4670964362 rename module and classes to domainblocks 2023-07-04 19:41:36 +02:00
Conny Duck 626a8760ae refactor instance blocks to paging 2023-07-04 19:30:57 +02:00
Nik Clayton 25376170c2
Migrate "room" from "kapt" to "ksp" (#3777)
- Add ksp plugin
- Switch room to use ksp instead of kapt
- `ArrayList` -> `List` in a few places to fix errors about unbound generics
2023-06-29 18:37:46 +02:00
Nik Clayton 1f7a5f626d
Show notifications from workers (#3760)
Fix a crash where workers, in some conditions, should show a notification. These are sent to a dedicated channel with no importance.

Convert NotificationWorker to a CoroutineWorker and remove its use of `runBlocking`.

Fixes #3754
2023-06-29 18:37:27 +02:00
Nik Clayton 7fe4c9f317
Adjust list UX for platform consistency (#3142)
Most lists in the app use (explicitly or implicitly) platform metrics for dimensions, text size, colour, and so on, possibly via styles.

A few don't, inadvertently using the user's setting for status text size

Fix these, and simplify code where possible.

- Use android attributes for padding and height, for consistent UX.

- Remove explicit usage of app:tabTextAppearance, rely on the style.

- Remove ListSelectionAdapter and item_picker_list.xml, and adjust TabPreferenceActivity to use an ArrayAdapter with simple_list_item_1.xml

- Simplify item_followed_hashtag.xml, consistent with item_list.xml.

Fixes https://github.com/tuskyapp/Tusky/issues/3131
2023-06-29 18:36:19 +02:00
Nik Clayton fe7b1529df
Provide a preference to scale all UI text (#3248)
Font scaling is applied in addition to any scaling set in Android system preferences. So if the user set the Android font size to largest (a 1.3x increase) and then sets the preference to 120%, the total change is 1.56x.

Create SliderPreference to adjust the preference.

- Use Slider, which supports float values and step sizes > 1
- Display the selected value in the preference's summary
- Provide buttons to increment / decrement the value

Restart the activity if the preference changes so that the user sees the impact of the change immediately. Fix a bug in PreferencesActivity where the "EXTRA_RESTART_ON_BACK" intent was never processed. Fix this to ensure that other activities are restarted so the new font scale takes effect.

Implement the scaling in BaseActivity by overriding onAttachBaseContext, and providing a wrapped context with the font scaling applied.

Fixes https://github.com/tuskyapp/Tusky/issues/2982, https://github.com/tuskyapp/Tusky/issues/2461
2023-06-29 18:34:56 +02:00
Nik Clayton 153a9ad9c2
Simplify repeated code that shows errors (#3762)
Instead of repeating the same if/else check on the error type when setting up the background message, move this in to BackgroundMessageView.

Provide different `setup()` variants, including one that just takes a throwable and a handler, and figures out the correct drawables and error message.

Update and simplify call sites.
2023-06-19 23:49:20 +02:00
GunChleoc af7e883165 Translated using Weblate (Gaelic)
Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
2023-06-19 14:26:14 +02:00
XoseM 75d5f247c7 Translated using Weblate (Galician)
Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
Hồ Nhất Duy 7942d497b2 Translated using Weblate (Vietnamese)
Currently translated at 99.8% (603 of 604 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
Chaitanya eacdc40268 Translated using Weblate (Hindi)
Currently translated at 58.1% (351 of 604 strings)

Co-authored-by: Chaitanya <hellochaitanya@protonmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hi/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
Eric 4de9e1446b Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
junius 0273beb3bd Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: junius <fifteenkilos@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
Quentí 7bbc4a9b00 Translated using Weblate (Occitan)
Currently translated at 100.0% (604 of 604 strings)

Co-authored-by: Quentí <quentinantonin@free.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
GunChleoc 87a85fe875 Translated using Weblate (Gaelic)
Currently translated at 100.0% (603 of 603 strings)

Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
Oliebol 73ccc81764 Translated using Weblate (Dutch)
Currently translated at 97.3% (587 of 603 strings)

Co-authored-by: Oliebol <schrijfmedan@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nl/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
Danial Behzadi 7b344067a9 Translated using Weblate (Persian)
Currently translated at 100.0% (604 of 604 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (603 of 603 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-06-18 13:46:58 +02:00
Nik Clayton 100673aa9c
Handle status edit histories with < 2 entries (#3747)
This can happen if the edit history has not been propogated to the user's server.

If the edit history is missing then show an error with a link to the specifc Mastodon issue.

Fixes #3743
2023-06-15 19:59:30 +02:00
Konrad Pozniak 9fedb6d5b2
Fix trending tags being cut off (#3745)
Fixes https://github.com/tuskyapp/Tusky/issues/3742
2023-06-15 11:27:57 +02:00
Eric 885b54a683 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (603 of 603 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-06-15 11:27:03 +02:00
Oliebol cdb7194fec Translated using Weblate (Dutch)
Currently translated at 97.3% (587 of 603 strings)

Co-authored-by: Oliebol <schrijfmedan@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nl/
Translation: Tusky/Tusky
2023-06-15 11:27:03 +02:00
L.Yo 0efd95b503 Translated using Weblate (Dutch)
Currently translated at 97.3% (587 of 603 strings)

Co-authored-by: L.Yo <pseudolyo@gmx.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nl/
Translation: Tusky/Tusky
2023-06-15 11:27:03 +02:00
sk 30a2af70ea Translated using Weblate (Japanese)
Currently translated at 92.3% (556 of 602 strings)

Co-authored-by: sk <sk736b@protonmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ja/
Translation: Tusky/Tusky
2023-06-15 11:27:03 +02:00
Prat 485a4c364e
Improve prompts when draft is empty (#3699)
When the user is closing the compose view,

    if it's new and empty, don't show a prompt.
    if it's an existing draft and now empty, ask if the user wants to delete it or continue editing. I don't think there is much value in saving an empty draft.
---------
2023-06-13 15:45:17 +02:00
Nik Clayton eedf6abf91
Catch missing classes in WorkerFactory (#3744)
When NotificationWorker was moved from ...components.notifications to
...worker.

Installing Tusky with this change doesn't remove any future periodic
jobs queued under the old class name. So when Class.forName() is
called the old class name is not found, and the exception is thrown.

Handle this the same way androidx.work.WorkerFactory does -- catch
the exception, log it, and return null.

Fixes #3740
2023-06-12 22:04:58 +02:00
Eric 5327c9f572 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (602 of 602 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-06-12 12:18:02 +02:00
Danial Behzadi ac49222d8c Translated using Weblate (Persian)
Currently translated at 100.0% (602 of 602 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-06-12 11:36:31 +02:00
Balázs Meskó 78f4954ee3 Translated using Weblate (Hungarian)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Balázs Meskó <mesko.balazs@fsf.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky
2023-06-12 11:36:31 +02:00
Konrad Pozniak 6e06e656b4
Make sure the active account is always correctly saved to database (#3720)
Fixes #3702
2023-06-11 20:24:26 +02:00
Konrad Pozniak 3698c72109
Correctly show non-square custom emojis (#3711)
Instead of forcing all emojis to be square, only the width is fixed now and the emoji scaled to fit.

Fixes #635
2023-06-11 20:06:34 +02:00
Nik Clayton 5755801e6f
Add a menu option to load the newest notifications (#3708)
- Create a flow with new items (arbitrary ints) when a reload from the top should happen
- Combine this flow with notificationFilter, so changes to either of them trigger a reload
- Provide a menu item in NotificationsFragment to initiate the reload
- Handle the action in the view model
2023-06-11 20:04:49 +02:00
Levi Bard 4cddd2c5e6
Add delete button to edit filter activity. (#3553)
Adds workaround for #3545
2023-06-11 19:59:26 +02:00
Nik Clayton 66a394245b
Remove ReplacementSpan, display diffs using CharacterStyle (#3431)
Remove the use of ReplacementSpan. It turns out this span type is incompatible with spans that occupy more than one line, and the result is that a longer diff can run off the end of the screen. The alternative means that the diff'd text doesn't have additional padding and rounded corners, but it's better than not being visible.

Display the most recent version of the status with larger text. Again, consistent with the thread view.

Display the avatar, name, and username of the poster in a pinned header at the top of the screen, instead of duplicating the information on every edit. This reduces the amount of redundant information on the screen.
2023-06-11 19:12:05 +02:00
Nik Clayton 84486c7f13
Ensure textview fields can be copy/pasted (#3707)
The Android libraries have a bug where a TextView can forget that it contains selectable text, can be pasted in to, etc.

See https://issuetracker.google.com/issues/37095917

Fix this with an extension method that toggles the selectable state to re-enable it, and use this on the profile fields when editing an account.

Fixes https://github.com/tuskyapp/Tusky/issues/3706
2023-06-11 18:39:48 +02:00
Nik Clayton 5fd532d69b
Notification tab cleanups (#3692)
- Use NO_POSITION instead of hardcoding 0.
- Don't set a state restoration policy, PagingDataAdapter already does that
- Return the closest item, not just the closest page, in getRefreshKey
2023-06-11 16:23:52 +02:00
Nik Clayton 327254d759
Remove android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" (#3663)
It caused text size differences between the text in this view and all the other textviews in this layout.

It's not used in other layouts.

Fixes https://github.com/tuskyapp/Tusky/issues/3494
2023-06-11 15:50:34 +02:00
Nik Clayton 2a9ad92e55
Make AccountPreferenceDataStore injectable (#3653)
This will make tests that need it easier.

- Rename from AccountPreferenceHandler
- Inject its dependencies
- Create an injectable CoroutineScope it can use for launching coroutines
- Use it in AccountPreferences
2023-06-11 15:34:58 +02:00
João Alves fc3b3f76bf Translated using Weblate (Portuguese (Portugal))
Currently translated at 84.6% (509 of 601 strings)

Co-authored-by: João Alves <joao.2003.couto+weblate@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2023-06-11 15:14:11 +02:00
Hồ Nhất Duy ea064edddf Translated using Weblate (Vietnamese)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-06-11 15:14:11 +02:00
Nik Clayton 152ca710c9 Translated using Weblate (Persian)
Currently translated at 100.0% (601 of 601 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (601 of 601 strings)

Translated using Weblate (Icelandic)

Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Nik Clayton <nik@ngo.org.uk>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
2023-06-11 15:14:11 +02:00
Danial Behzadi 48c435d499 Translated using Weblate (Persian)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-06-11 15:14:11 +02:00
Quentí d131df06a4 Translated using Weblate (Occitan)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Quentí <quentinantonin@free.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
2023-06-11 15:14:11 +02:00
Mārtiņš Bruņenieks c3229760c1 Translated using Weblate (Latvian)
Currently translated at 92.8% (558 of 601 strings)

Co-authored-by: Mārtiņš Bruņenieks <martinsb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translation: Tusky/Tusky
2023-06-11 15:14:11 +02:00
Sveinn í Felli 97b44228b7 Translated using Weblate (Icelandic)
Currently translated at 100.0% (601 of 601 strings)

Translated using Weblate (Icelandic)

Currently translated at 99.8% (600 of 601 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
2023-06-11 15:14:11 +02:00
Nik Clayton 8fec41c2ae
Send UI errors to a channel instead of a shared flow (#3652)
In the previous code any errors that occured *before* a subscriber was
listening to `uiError` would be dropped, so the user would be unware
of them.

By implementing as a channel these errors will be shown to the user,
with an opportunity to retry the operation or report the error.
2023-06-11 14:00:05 +02:00
Nik Clayton 5e8a63a046
Throttle UI actions instead of debouncing (#3651)
Introduce Flow<T>.throttleFirst(). In a flow this emits the first value,
and each value afterwards that is > some timeout after the previous
value.

This prevents accidental double-taps on UI elements from generating
multiple-actions.

The previous code used debounce(). That has a similar effect, but with
debounce() the code has to wait until after the timeout period has
elapsed before it can process the action, leading to an unnecessary
UI delay.

With throttleFirst a value is emitted immediately, there's no need
to wait. It's subsequent values that are potentially throttled.
2023-06-11 13:34:22 +02:00
Nik Clayton 4025ab35ff
Move cache pruning to a WorkManager worker (#3649)
- Extend what was `NotificationWorkerFactory` to `WorkerFactory`. This
  can construct arbitrary Workers as long as they provide their own
  Factory for construction.

  The per-Worker factory contains any injected components just for that
  worker type, keeping `WorkerFactory` clean.

- Move `NotificationWorkerFactory` to the new model.

- Implement `PruneCacheWorker`, and remove the code from
 `CachedTimelineViewModel`.

- Create the periodic worker in `TuskyApplication`, ensuring that the
  database is only pruned when the device is idle.
2023-06-11 13:17:30 +02:00
Konrad Pozniak 85b7caa887
Replace deprecated getParcelable* methods with compat versions (#3633) 2023-06-11 12:58:55 +02:00
Konrad Pozniak f23c0cc634
Refactor "trending hashtags" code (#3595)
- Fix codeformatting
- Add new refreshing state
- Disable LogConditional lint rule
- Update lint-baseline
2023-06-10 19:47:07 +02:00
Nik Clayton 071e00774e
Replace shortNumber() with formatNumber() (#3519)
formatNumber() was existing code to show numbers with suffixes like K, M, etc, so re-use that code and delete shortNumber().

Update the tests to (a) test formatNumber(), and (b) be parameterised.
2023-06-10 16:29:26 +02:00
Nik Clayton 01b3cb3a53
Fetch all outstanding Mastodon notifications when creating Android notifications (#3700)
* Fetch all outstanding Mastodon notifications when creating Android notifications

Previous code fetched the oldest page of unfetched Mastodon notifications.

If you had more than a page of Mastodon notifications you'd get Android notifications for that page, then ~ 15 minutes later Android notifications for the next page, and so on.

This code fetches all the outstanding notifications at once.

If this results in more than 40 total notifications the list is still trimmed so that a maximum of 40 Android notifications is displayed.

Fixes https://github.com/tuskyapp/Tusky/issues/3648

* Build the list using buildList
2023-06-01 19:31:30 +02:00
Nik Clayton 346dabffc5
Write notification account information to the correct account (#3697)
Don't use `accountManager.activeAccount` throughout the code.

Instead, get the active account once, and use that over the life of the viewmodel.

As shown in https://github.com/tuskyapp/Tusky/issues/3689#issuecomment-1567219338 the active account can change before the view model is destroyed, and if that happens account information for the account will be written to the wrong account.
2023-06-01 19:19:18 +02:00
Manuel 61374c5180 Translated using Weblate (Italian)
Currently translated at 93.5% (562 of 601 strings)

Co-authored-by: Manuel <mannivuwiki@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
2023-05-29 23:35:34 +02:00
Nik Clayton 34de33220c
Don't overwrite the active account when composing from a notification (#3688)
Fix a bug where the active account can be overwritten.

1. Have two accounts logged in to Tusky, A and B
2. Open Tusky as account A
3. Send a DM to account B (doesn't have to be a DM, just anything that creates a notification for account B)
4. Restart Tusky so the Android notification for the DM is displayed immediately. You are still acting as account A.
5. Drag down the Android notification, you should see two options, "Quick reply" and "Compose"
6. Tap "Compose"
7. ComposeActivity will start. You are now acting as account B. Compose and send a reply
8. You'll be returned to the "Home" tab.

The UI will show you are still account A (i.e., it's account A's avatar at the top of the screen, if you have the "Show username in toolbars" option turned on it will be account A's username in the toolbar).

But you are now seeing the home timeline for account B.

Fix this.

ComposeViewModel
- Do not rely on the active account in sendStatus(), receive the account ID as a parameter

ComposeActivity
- Use either the account ID from the intent, or the current active account. **Do not** change the active account
- Pass the account ID to use in the sendStatus() call
2023-05-29 13:32:56 +02:00
Deleted User 8183ef29e4 Translated using Weblate (German)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Deleted User <noreply+280@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-05-27 16:21:10 +02:00
Nik Clayton 57e79b3f00
Save and restore the user's reading position more frequently (#3685)
The previous code gets the user's reading position *once*, when the
viewmodel is created, and uses that whenever it needs to be restored.

This is a problem. Suppose the user is a few days behind on their
notifications, and opens the app.

The reading position is restored, as expected. They scroll up to start
reading newer notifications.

Then they change their notification filters. This causes the
notifications list to change, and when it does their reading position
is set back to what it was when they first switched to the Notifications
tab.

Fix this by:

NotificationsFragment:
- Save the reading position whenever the user stops scrolling.

NotificationsViewModel:
- Use the saved reading position whenever the list of notifications
  can change, not just when the view model is created.
2023-05-23 20:07:39 +02:00
Mārtiņš Bruņenieks 16eabc9d3c Translated using Weblate (Latvian)
Currently translated at 92.5% (556 of 601 strings)

Co-authored-by: Mārtiņš Bruņenieks <martinsb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translation: Tusky/Tusky
2023-05-22 17:22:46 +02:00
Gordot Forrot 01c7e2c860 Translated using Weblate (Spanish)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Gordot Forrot <grdofrro@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/es/
Translation: Tusky/Tusky
2023-05-22 17:22:46 +02:00
Andrés Blasco Arnáiz cd211fa157 Translated using Weblate (Spanish)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Andrés Blasco Arnáiz <andresbarnaiz@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/es/
Translation: Tusky/Tusky
2023-05-22 17:22:46 +02:00
Deleted User 931a09eab7 Translated using Weblate (German)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Deleted User <noreply+279@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-05-20 10:18:17 +02:00
Hồ Nhất Duy 7343d3261c Translated using Weblate (Vietnamese)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-05-20 10:18:17 +02:00
Nik Clayton d644f6e6f3
Save the a copy of the notification marker ID locally (#3672)
Not all servers support the marker API. If they don't the user will
potentially get duplicate Android notifications.

To resolve this, store a copy of the notification marker ID locally as
well. Defer to the remote marker if it exists (and is newer than the
local marker).

Fixes https://github.com/tuskyapp/Tusky/issues/3671
2023-05-18 23:23:42 +02:00
Quentí 7e6beb5b1f Translated using Weblate (Occitan)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Quentí <quentinantonin@free.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
2023-05-17 20:35:54 +00:00
Deleted User 4723321764 Translated using Weblate (German)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Deleted User <noreply+278@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-05-16 17:35:54 +00:00
Nik Clayton 158f9b83fb
updateMarkersWithAuth(): Require DOMAIN header (#3660)
Otherwise markers are updated for the wrong account.

Fixes https://github.com/tuskyapp/Tusky/issues/3658
2023-05-16 18:24:38 +02:00
Nik Clayton 92ba53a8c3
Compare notification IDs by length as well as value (#3657) 2023-05-15 23:11:14 +02:00
Hồ Nhất Duy 6749016d9c Translated using Weblate (Vietnamese)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-05-14 15:35:54 +00:00
Nik Clayton 81b15e72f3
Only fetch and display a given notification once (#3626)
When fetching:

- Maintain a marker with the position of the newest fetched notification
- Use the marker to determine which notifications to fetch
- Fetch notifications with min_id to ensure that none are lost
- Update the marker as necessary
- Perform a one-time immediate fetch of notifications on startup

When creating notifications:

- Identify each notification with tag=${MastodonNotificationId}, id=${account.id}
- Remove activeNotifications field, it's no longer necessary
- Use the tag/id tuple to reliably identify existing notifications and avoid creating duplicates
- Cancelling notifications for an account must iterate over all the notifications, and individually remove the notifications that exist for that account.
- Limit notifications to a maximum of 40 (excluding summary notifications)
- Remove notifications (oldest first) to get under this limit
- Rate limit notification creation to 1 per second, so the OS won't drop them

Adjust the summary notification:

- Ensure the summary notification and the child notifications have the same group key
- Dismiss the summary notification if there is only one child notification

NotificationClearBroadcastReceiver is no longer needed, so remove it, and the need for deletePendingIntent.

Fixes #3625, #3539
2023-05-13 16:00:28 +02:00
Konrad Pozniak 74a00c0591
Make links in bios of follow request and follow notifications work (#3646)
* make links in bios of follow request and follow notifications work
* use ClickableSpanTextView to display account notes
2023-05-13 15:32:56 +02:00
Ihor Hordiichuk 82ff7e0b5c Translated using Weblate (Ukrainian)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2023-05-13 02:35:54 +00:00
puf 7c294268de Translated using Weblate (Welsh)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-05-13 02:35:54 +00:00
Deleted User 6df8ccdc60 Translated using Weblate (German)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Deleted User <noreply+277@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-05-11 11:20:19 +00:00
Nik Clayton c4b3b9c53f
Merge pull request #3574 from nailyk-weblate/weblate-tusky-tusky
Translations update from Weblate
2023-05-11 13:33:07 +02:00
Nik Clayton baac55b6f6
Update app/src/main/res/values-fr/strings.xml 2023-05-11 13:23:08 +02:00
Nik Clayton 69ce3af1b1
Add missing "one" plural string for FR / hint_describe_for_visually_impaired 2023-05-11 13:21:09 +02:00
Nik Clayton 7f8f04460c
Add entry for "or" to locales_config.xml and donottranslate.xml (#3584) 2023-05-11 12:54:51 +02:00
Nik Clayton b12e772a0b
FilterResult.status_matches is a List<String>? (#3634)
See https://github.com/mastodon/documentation/pull/1214
2023-05-09 17:56:48 +02:00
Deleted User 718a7b125d Translated using Weblate (German)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Deleted User <noreply+276@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
Paul Sanz 95fd4918c5 Translated using Weblate (Spanish)
Currently translated at 95.1% (572 of 601 strings)

Co-authored-by: Paul Sanz <registro@polkillas.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/es/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
Hakan e4f766d447 Translated using Weblate (Turkish)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Hakan <hakanutku@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
GunChleoc 0fe45c5238 Translated using Weblate (Gaelic)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
TAKAHASHI Shuuji d9b1abc90e Translated using Weblate (Japanese)
Currently translated at 92.5% (556 of 601 strings)

Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ja/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
xzFantom 18a224c53b Translated using Weblate (Belarusian)
Currently translated at 98.0% (589 of 601 strings)

Translated using Weblate (Belarusian)

Currently translated at 95.0% (571 of 601 strings)

Co-authored-by: xzFantom <xzfantom@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
Subham Jena be8be43bc4 Translated using Weblate (Odia)
Currently translated at 2.3% (14 of 601 strings)

Co-authored-by: Subham Jena <subhamjena8465@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/or/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
codl 22b1a2c1e0 Translated using Weblate (French)
Currently translated at 100.0% (601 of 601 strings)

Translated using Weblate (French)

Currently translated at 97.8% (588 of 601 strings)

Translated using Weblate (French)

Currently translated at 89.5% (538 of 601 strings)

Translated using Weblate (French)

Currently translated at 79.5% (478 of 601 strings)

Co-authored-by: codl <codl@codl.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fr/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
Deleted User f7aaeedabf Translated using Weblate (German)
Currently translated at 100.0% (601 of 601 strings)

Co-authored-by: Deleted User <noreply+272@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-05-09 15:44:10 +00:00
Connyduck 05850ec216 Added translation using Weblate (Odia)
Co-authored-by: Connyduck <weblate@connyduck.at>
2023-05-09 15:44:10 +00:00
Conny Duck b18193e6c3 add logging to NetworkTimelineRemoteMediator 2023-05-08 19:27:00 +02:00
Conny Duck 3ac78c82c9 don't crash on unexpected json responses 2023-05-08 19:24:57 +02:00
Nik Clayton 367240a612
Save the user's reading position in the home timeline (#3614)
- Add a field to AccountEntity to hold the reading position
- Provide a method to save in the viewmodel to save the position
- Save the position when TimelineFragment pauses

Does not restore the position yet.
2023-05-08 13:57:17 +02:00
Konrad Pozniak d2747811be
Fix crash in ViewThreadFragment.removeItem (#3622) 2023-05-05 12:03:42 +02:00
Nik Clayton 7ce5048752
Show the requester's bio in a "wants to follow you" notification (#3284) 2023-05-04 16:00:30 +02:00
UlrichKu 1040358f3c
Ensure text field has focus when reporting statuses 2023-05-04 14:53:27 +02:00
Nik Clayton a7001eecb8
Use the tab's contentDescription as the toolbar title (#3609)
Previous code had an IndexOutOfBoundsException where tab.position could be larger than the tabs array.
2023-05-04 13:19:44 +02:00
Nik Clayton 4da758c1f7
Check for non-empty pages when falling back (#3603)
Requesting a non-existent notification ID will cause the fall-back requests to succeed but return empty lists which stops pagination.

Check for this, and in the worst case, fall back to returning the most recent notifications.
2023-05-04 13:19:28 +02:00
Konrad Pozniak 62b91664e9
Allow multiline polls (this time for real) (#3608) 2023-05-03 09:05:05 +02:00
Konrad Pozniak 5abd3dc9fe
fix reporting (#3607) 2023-05-02 18:20:02 +02:00
UlrichKu 5cac17b7a9
#3430: (fix) do not hide the anchor of the FAB (#3561)
On Account preferences > Filters

With the list hidden on an empty view the FAB is erroneouly placed on the top left of the screen.

(Introduced with #3430)
2023-04-30 21:51:36 +02:00
Nik Clayton 0a39ee7ded
Force a layout pass to ensure spans are measured correctly (#3600)
Fixes https://github.com/tuskyapp/Tusky/issues/3596
2023-04-30 21:50:52 +02:00
Konrad Pozniak 11cf93fa55
Remove unused class PairedList (#3602) 2023-04-30 21:49:05 +02:00
Nik Clayton ccab33dd0f
Add additional margin after the "X <performed an action>" view (#3597)
Add additional 6dp margin to the top of the username view, to provide more space after the "X <performed an action>" view, consistent with item_follow.xml.
2023-04-30 14:28:01 +02:00
Nik Clayton 03031e5716
Set initialLoadSize = pageSize (#3598)
The pageSize is large enough that there's no need for the default 3 x pageSize initialLoadSize value, and this improves performance.

Fixes https://github.com/tuskyapp/Tusky/issues/3578
2023-04-29 19:34:29 +02:00
Nik Clayton 152318ce85
Show filter title instead of filter keywords (#3589)
Avoid showing the user the things they have filtered on when showing a filter placeholder in a timeline.
2023-04-29 18:56:27 +02:00
Nik Clayton 5c28cba57d
Show 0/1/1+ for replies, even if show stats is off (#3590)
Fixes https://github.com/tuskyapp/Tusky/issues/3588
2023-04-29 16:49:04 +02:00
Konrad Pozniak a5578cf765
Check view is non-null before scrolling, fix crash in NotificationsFragment (#3594)
The posted message runs at the end of the message queue, by which time the view may no longer exist.
2023-04-29 16:39:49 +02:00
Nik Clayton 2f512705e8
Fix IndexOutOfBoundsException in onPause (#3581)
Use `getOrNull` instead of `get`, which was occasionally throwing IndexOutOfBoundsException.
2023-04-27 12:59:32 +02:00
Nik Clayton 23c3c3b492
Fix translation merge conflicts (#3563) 2023-04-24 15:27:54 +02:00
Nik Clayton 4754388f99
Add padding below status content (#3559)
Fixes #3550
2023-04-24 14:58:49 +02:00
Nik Clayton f1b3faf85f
Show the follower's bio/note in a "followed you" notification (#3281)
This makes the notification view for a follow request contain more info about the new follower, and makes the layout (of their name / username) consistent with other notifications that show names/usernames.
2023-04-24 12:09:34 +02:00
UlrichKu 24d7ef7ccb
Always publish image alt text
Previous code would discard the image alt-text if the user finished writing the text before the image had finished uploading.

This code ensures the text is set after the image has completed uploading.
2023-04-24 11:48:40 +02:00
UlrichKu 8de5613b47
3509: Ensure filter edit dialog is scrollable (#3510) 2023-04-23 22:39:19 +02:00
Nik Clayton 73be497bbe
Merge pull request #3513 from Lakoja/fix-relationship-crash
Do not crash on empty relationship response
2023-04-23 18:36:13 +02:00
Nik Clayton b57db0589d
Merge pull request #3514 from Lakoja/fix-edgy-crashes
Do not crash on/avoid index out of bounds
2023-04-21 19:52:45 +02:00
UlrichKu b14549e041
3503: SwipeRefreshLayout must be higher level (#3504)
* 3503: SwipeRefreshLayout must be higher level

* 3503: Fix notifications view a bit

* 3503: Wrap recycler views and message views in the swipe-to-refresh if all are present
2023-04-20 19:36:29 +02:00
UlrichKu 040268e2d3
3492: Correctly shorten name in drawer and notifications (#3495)
* #3492: Correctly shorten name in drawer and notifications

* Trigger linter again

* 3492: Use a flat ContraintLayout for everything
2023-04-08 16:55:32 +02:00
XoseM 3f680872b5 Translated using Weblate (Galician)
Currently translated at 100.0% (603 of 603 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2023-04-08 09:04:58 +00:00
Hồ Nhất Duy 33144c28fa Translated using Weblate (Vietnamese)
Currently translated at 100.0% (603 of 603 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-04-08 09:04:58 +00:00
Ihor Hordiichuk 3264b9706b Translated using Weblate (Ukrainian)
Currently translated at 100.0% (603 of 603 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2023-04-08 09:04:58 +00:00
Eric d9cb87d522 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (603 of 603 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-04-08 09:04:58 +00:00
Danial Behzadi bddf4481a7 Translated using Weblate (Persian)
Currently translated at 100.0% (603 of 603 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-04-08 09:04:58 +00:00
Lakoja bca98d2f48 Do not crash on/avoid index out of bounds 2023-04-05 15:48:40 +02:00
Lakoja eb52c8ca58 Do not crash on empty relationship response 2023-04-05 10:54:03 +02:00
UlrichKu cf50d0563f
3416: Call the list activity when list list empty (#3426)
* 3416: Call the list activity when empty; show failure on loading

* 3416: Revert include grouping

* 3416: Remove faulty include after merge

* 3416: Added a list loading progress

* 3416: Add proper padding to progress

* 3416: Show a text if there are no lists, do not change dialog title

* 3416: Center things in layout

* 3416: Appease linter (?)

* 3416: Do not hide manage lists button

* 3416: Use ThemeUtils
2023-03-30 21:23:08 +02:00
UlrichKu eee1414aff
#2528: Also clear notifications on refresh in notifications timeline (#3498) 2023-03-30 19:38:44 +02:00
UlrichKu 8958c50de7
#3178: Increase contrast for separator lines in dark themes (#3497) 2023-03-30 19:31:23 +02:00
UlrichKu 23381d45d7
3430: Make list refresh/retry consistent (#3474)
* 3430: Make list refresh/retry consistent

* 3430: Add swipe-to-refresh and use states in filter lists
2023-03-30 19:29:42 +02:00
Conny Duck fcd997f36c Merge remote-tracking branch 'weblate/develop' into develop
# Conflicts:
#	app/src/main/res/values-es/strings.xml
#	app/src/main/res/values-gl/strings.xml
2023-03-30 19:00:34 +02:00