Commit graph

4,390 commits

Author SHA1 Message Date
UlrichKu
6450af6edb
Improve push notifications (#4896)
Besides the refactoring these improvements:
* Track last push distributor and reset settings and subscription on any
incompatible change (ie. uninstall)
* Only update (push) notification settings on server if needed
* Allow to only fetch notifications for one account (the one for which a
push message was received)

This is (also) the revival of
https://github.com/tuskyapp/Tusky/pull/3642

It's not really well tested so far. (Ie. with two or more accounts or
two or more push providers.)
2025-02-20 12:27:06 +01:00
Konrad Pozniak
f95dbe82b0
fix trending tag ellipsized too soon (#4924)
Before:

<img
src="https://github.com/user-attachments/assets/bc2907a1-8207-43bd-8eb9-3a76e25c20a1"
width="320" />
2025-02-17 15:17:39 +01:00
Konrad Pozniak
35cef6cb94
fix RecyclerView.ensureBottomPadding on older Api levels (#4917)
The setOnApplyWindowInsetsListener callback is not always excecuted,
e.g. because there are no insets to consume on older api levels. This
fixes the problem and makes sure our RecyclerViews always have the
correct bottom padding and are not covered by other views.
2025-02-17 15:16:58 +01:00
Konrad Pozniak
36a4de9b40
use updateRelativeTimePeriodically everywhere (#4916) 2025-02-17 15:16:41 +01:00
Konrad Pozniak
759902b280
fix search pull-to-refresh (#4915)
Before this, refreshing the status search would show the loading spinner
but not actually do something (account and hashtag search worked fine).
2025-02-17 15:16:29 +01:00
Konrad Pozniak
bc78af47ba
fix dropdowns in dialogs going behind the keyboard (#4913)
I tried to find a solution without using a deprecated api to no avail.
But better a working app than perfect code I guess.

In the end this probably is a bug in the Material component library
https://github.com/material-components/material-components-android/issues/3307.

I also made the insets smaller which improves the dialogs a lot on small
screens.
2025-02-11 17:24:35 +01:00
Konrad Pozniak
1b0e396c4c
reduce height of bottom bar (#4912)
back to what it was in Tusky 27

Api 29 before / after

<img
src="https://github.com/user-attachments/assets/e624b964-8bc5-41b0-b247-b5df082d67e1"
width="280" /> <img
src="https://github.com/user-attachments/assets/7696bacd-5d2d-42b2-aff4-e6fa46e8a35d"
width="280" />


Api 35 before / after

<img
src="https://github.com/user-attachments/assets/232d96d6-1bf5-45d9-92dd-b825abb26a04"
width="280" /> <img
src="https://github.com/user-attachments/assets/8f9567dc-9f07-4560-b514-5f5230e4880a"
width="280" />
2025-02-11 17:24:24 +01:00
Konrad Pozniak
b42c1e8eb5
fix conversation tab not having any content (#4911)
regression from https://github.com/tuskyapp/Tusky/pull/4909
2025-02-07 11:16:19 +01:00
Konrad Pozniak
b7f7b6d6b2
don't hide the action button when showing trending tags (#4910)
This fixes a bug where the action button would be hidden until app
restart when trending tags have been visible once.
2025-02-07 08:14:14 +01:00
Konrad Pozniak
b24427c6df
fix diffing statuses (#4909)
Several cases of payloads not being forwarded correctly, leading to
unnecessary re-binding of the whole status view. I simplified the logic
by removing the additional list level, making it easier to understand
what is going on.
2025-02-06 11:38:05 +01:00
Konrad Pozniak
78152f0449
Full support for Android 15, edge-to-edge mode on Android 15 (#4897)
- Update to Api 35
- Update all dependencies that were blocked because they require Api 35
- fix some deprecation warnings
- implement the now required edge-to-edge mode

Edge-to-edge mode means that we now draw under the status bar and the
navigation bar and need to make sure we don't overlap with them.
Previously the system would do that for us, and we would only provide
the color we want the bars in.

For the edge-to-edge mode there are two Apis that are important:
- `fitsSystemWindows` - some Widgets, mostly from the Material library,
automatically handle system insets if you set this attribute on them to
true
- `ViewCompat.setOnApplyWindowInsetsListener` - this allows you to
manually handle the various insets. By returning new insets from the
callback it is possible to tell the system which ones are handled and
which ones should be taken care of by another view.

In most places edge-to-edge was straightforward to implement, except in
`ComposeActivity`, `AccountActivity` and `MainActivity` which required a
more custom approach, and a hacky solution to make landscape mode work
in `BaseActivity`.

There is also the `ViewCompat.setWindowInsetsAnimationCallback` Api
which allows animating with moving insets. I used that in
`LoginActivity` and `ComposeActivity` to animate the Views together with
the keyboard.

On Android Versions below 15 (Api <= 34) Tusky will look almost the same
as before. I think the only exception is the main bottom bar, which is
now slighty larger. We customized it to be smaller than the default, but
in edge-to-edge mode the height needs to be `wrap_content` or it won't
handle insets correctly.

Screenshots: 

<img
src="https://github.com/user-attachments/assets/2a1bf5d9-79fb-48eb-affc-1cbb1164d5f0"
width="280"/>
<img
src="https://github.com/user-attachments/assets/9edccdf2-c0e9-4881-a6df-bd0872934f28"
width="280"/>
<img
src="https://github.com/user-attachments/assets/2916a271-f53e-4d38-a83a-69083eb3053f"
width="280"/>
2025-02-06 11:37:54 +01:00
Konrad Pozniak
b3d5aff435
move NotificationTypeConverter into Converters (#4908)
There is no reason why we would treat this one differently. Ok, it might
be a bit less efficient but I take that in exchange for the cleaner
code.
2025-02-05 20:31:56 +01:00
Russty
fa00fbb470 Translated using Weblate (Slovak)
Currently translated at 87.1% (590 of 677 strings)

Co-authored-by: Russty <russellt@duck.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sk/
Translation: Tusky/Tusky
2025-02-02 20:08:54 +00:00
jungmin0049
081a31e477 Translated using Weblate (Korean)
Currently translated at 51.4% (348 of 677 strings)

Co-authored-by: jungmin0049 <jungmin0049@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ko/
Translation: Tusky/Tusky
2025-02-02 20:08:54 +00:00
Eric
8185bfaacb Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (677 of 677 strings)

Co-authored-by: Eric <alchemillatruth@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2025-02-02 20:08:54 +00:00
Bruno Miguel
12cef7177b Translated using Weblate (Portuguese (Portugal))
Currently translated at 100.0% (677 of 677 strings)

Co-authored-by: Bruno Miguel <brunoalexandremiguel@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2025-02-02 20:08:54 +00:00
Hồ Nhất Duy
2fc2bcd3f6 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (677 of 677 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2025-02-02 20:08:54 +00:00
fin-w
e153422b02 Translated using Weblate (Welsh)
Currently translated at 100.0% (677 of 677 strings)

Co-authored-by: fin-w <fin-w@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2025-02-02 20:08:54 +00:00
Konrad Pozniak
a0f6f289e3
Translations update from Weblate (automated) (#4901)
Translations update from [Weblate](https://weblate.tusky.app) for
[Tusky/Tusky](https://weblate.tusky.app/projects/tusky/tusky/).



Current translation status:

![Weblate translation
status](https://weblate.tusky.app/widget/tusky/tusky/horizontal-auto.svg)

---------

Co-authored-by: Eric <alchemillatruth@users.noreply.weblate.tusky.app>
Co-authored-by: Etienne Schneider <et.schneider@free.fr>
Co-authored-by: Anna Abramek <coffeeplant@abramek.art>
2025-01-29 20:05:06 +01:00
Konrad Pozniak
19041d7992
fix MainActivity not restarting when theme changes (#4900)
`EXTRA_RESTART_ON_BACK` is never set on the Intent extras, but
`intent.extras?.getBoolean(EXTRA_RESTART_ON_BACK)` will return `false`
as long as there are any extras, hiding the actual value from the
`savedInstanceState`.
2025-01-29 20:04:37 +01:00
Anna Abramek
86a94dc9fa Translated using Weblate (Polish)
Currently translated at 78.9% (535 of 678 strings)

Co-authored-by: Anna Abramek <coffeeplant@abramek.art>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pl/
Translation: Tusky/Tusky
2025-01-29 18:32:21 +00:00
Etienne Schneider
3a21b980d8 Translated using Weblate (French)
Currently translated at 96.9% (657 of 678 strings)

Co-authored-by: Etienne Schneider <et.schneider@free.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fr/
Translation: Tusky/Tusky
2025-01-29 18:32:21 +00:00
Eric
4eebc10e14 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (678 of 678 strings)

Co-authored-by: Eric <alchemillatruth@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2025-01-29 18:32:21 +00:00
Conny Duck
1c8092c7a1
remove plurals.xml 2025-01-27 20:57:23 +01:00
Sveinn í Felli
e1e96c2cad Translated using Weblate (Icelandic)
Currently translated at 100.0% (678 of 678 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
2025-01-24 09:07:13 +00:00
Konrad Pozniak
8f8b8195a1
fix trending tags for rtl languages (#4889)
closes https://github.com/tuskyapp/Tusky/issues/4887

And some other small improvements like better paddings and font sizes.
Also the `status_info` in `item_status` now looks nicer in rtl mode.
2025-01-23 19:25:46 +01:00
Konrad Pozniak
170358fe89
fix voting in boosted polls on user profiles (#4890)
Without this fix, the vote goes through but the poll in the app doesn't
update.
Fixed by using `updateStatusByActionableId`, which automatically handles
boosted & regular posts. Also handle poll votes the same way as in the
home timeline, by listening to the `PollVoteEvent`.
2025-01-23 19:22:51 +01:00
Russty
d751348452 Translated using Weblate (Slovak)
Currently translated at 85.3% (579 of 678 strings)

Co-authored-by: Russty <russellt@duck.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sk/
Translation: Tusky/Tusky
2025-01-22 19:55:59 +00:00
Weblate
5313d0419c Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/
Translation: Tusky/Tusky
2025-01-22 19:55:59 +00:00
Ihor Hordiichuk
a04bbd39b0 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2025-01-22 19:55:59 +00:00
UlrichKu
3a3e056572
Refactor notifications (#4883)
Also fixes https://github.com/tuskyapp/Tusky/issues/4858.
But apart from that there should be no functional change.
2025-01-22 21:16:33 +01:00
Konrad Pozniak
6c85f72a35
apply Tusky side hometimeline filters to own posts again (#4879)
addresses part of #4874
2025-01-17 13:18:49 +01:00
Conny Duck
9d1a4bc0f9
Merge branch 'main' into develop
# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsViewModel.kt
#	app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt
2025-01-17 12:55:16 +01:00
Konrad Pozniak
3db8e0b5a3
center icon in small send button (#4875)
2 users complained already 😔 

Before:

![before](https://github.com/user-attachments/assets/d3472856-a01e-42c6-b477-88fc376c63de)

After:

![after](https://github.com/user-attachments/assets/6722dac7-59d3-47b7-9718-6caae5eb0bec)
2025-01-17 12:41:45 +01:00
Konrad Pozniak
fd7d966148
improve preview card when there is no author or description (#4872)
Remove the bottom space on vertical layout, center text vertically on
horizontal layout. Make sure the image on the horizontal layout is at
least square.


Before / After:

<img
src="https://github.com/user-attachments/assets/a2399c50-c878-413f-bb65-a45b2c0af90c"
width="280"/>

<img
src="https://github.com/user-attachments/assets/8b83a1d9-3991-4f9c-981f-2a50354b6727"
width="280"/>
2025-01-17 12:35:48 +01:00
Konrad Pozniak
9e597800c9
Move all database queries off the ui thread & add a ViewModel for MainActivity (#4786)
- Move all database queries off the ui thread - this is a massive
performance improvement
- ViewModel for MainActivity - this makes MainActivity smaller and
network requests won't be retried when rotating the screen
- removes the Push Notification Migration feature. We had it long
enough, all users who want push notifications should be migrated by now
- AccountEntity is now immutable
- converted BaseActivity to Kotlin
- The header image of Accounts is now cached as well
2025-01-17 12:35:35 +01:00
Conny Duck
6cfda66fcb
prepare release 129 2025-01-16 17:25:08 +01:00
Konrad Pozniak
dd0848dac8
show actual hashtags in title of hashtag tab (#4868)
Instead of just "Hashtags".

Actually, this was a bug. The code to generate the correct title is
already here, but it wasn't called. 🤷

closes https://github.com/tuskyapp/Tusky/issues/4867
2025-01-16 17:15:16 +01:00
Konrad Pozniak
a24c4718af
fix dialog background colors (#4864)
In https://github.com/tuskyapp/Tusky/pull/4851 I changed the theme of
`AccountsInListFragment`, which accidentally turned its background white
for the dark theme.

Additionally this fixes the color for the preference dialogs, which I
think have been incorrect since the Material3 redesign.

I also wondered if we should make dialogs darker for the black theme,
but looks like there is not much interest in that
https://chaos.social/deck/@ConnyDuck/113802937491059461
(Currently they are just the same as the dark theme)
2025-01-16 17:15:02 +01:00
Konrad Pozniak
5aaf885536
fix ANR when loading more on a slow connection (#4865)
There were network calls inside a database transaction. That basically
locked the database for the duration of the network call, causing the
app to freeze if the call took to long.
2025-01-16 17:14:46 +01:00
idontwanttohaveausername
ba8d279286 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: idontwanttohaveausername <bydlanm@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2025-01-16 11:58:12 +00:00
Ihor Hordiichuk
3e166d2864 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2025-01-16 11:58:12 +00:00
Manuel
36d261cf89 Translated using Weblate (Italian)
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: Manuel <mannivuwiki@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
2025-01-16 11:58:12 +00:00
José M
433b5e6645 Translated using Weblate (Galician)
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: José M <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2025-01-16 11:58:12 +00:00
Hồ Nhất Duy
64cdea2449 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2025-01-16 11:58:12 +00:00
Eric
72dc40c887 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: Eric <alchemillatruth@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2025-01-16 11:58:12 +00:00
Danial Behzadi
f60c7ccfd8 Translated using Weblate (Persian)
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2025-01-16 11:58:12 +00:00
fin-w
1ccfd4d154 Translated using Weblate (Welsh)
Currently translated at 100.0% (682 of 682 strings)

Co-authored-by: fin-w <fin-w@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2025-01-16 11:58:12 +00:00
Weblate
c3d745e85d Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/
Translation: Tusky/Tusky
2025-01-14 18:09:51 +00:00
Russty
38f0817ec0 Translated using Weblate (Slovak)
Currently translated at 75.0% (510 of 680 strings)

Co-authored-by: Russty <russellt@duck.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sk/
Translation: Tusky/Tusky
2025-01-14 18:09:51 +00:00