Commit Graph

4189 Commits

Author SHA1 Message Date
Konrad Pozniak 85a59ec1f5
prepare release 26.2 (#4646) 2024-09-04 20:17:35 +02:00
mcclure 2a1cc7580c
Do not cancel the caption dialog on touches on navbar (#4643)
This one is odd.
I find that if I
- Add an image to a post
- Set a caption on the image
- Tap the caption dialog to bring up the keyboard
- Tap the navbar (very easy to do by accident while typing, just tap
under the spacebar)

The caption dialog disappears and you lose your caption.
(This doesn't happen in ANY other dialog in the app, and in the caption
dialog it ONLY happens when the keyboard is up.)
I got a tablet and on the tablet this happens ALL THE TIME.

I was considering adding a "really cancel?" dialog to the caption
dialog. But then I discovered (thank you @memorion@mastodon.social) by
setting getCanceledOnTouchOutside(false), I could make the bad behavior
go ahead completely. In my tests now I can only make the dialog go away
by tapping the actual back button.

I believe the potential negative impact of this is low because the
caption dialog is full screen, so it was already impossible to trigger
the touch outside behavior on *purpose*.

I might attempt a "really cancel caption?" dialog later because it sucks
to lose a long caption you have typed, but I think this fixes my
personal problem by itself.

---------

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
2024-09-02 20:50:55 +02:00
Konrad Pozniak 24f227fd4f
fix crash when there are reblogs in notification statuses (#4638)
```
android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)
    at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
    at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:961)
    at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
    at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:89)
    at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.kt:42)
    at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.kt:101)
    at com.keylesspalace.tusky.db.dao.TimelineStatusDao_Impl$insert$2.call(TimelineStatusDao_Impl.kt:345)
    at com.keylesspalace.tusky.db.dao.TimelineStatusDao_Impl$insert$2.call(TimelineStatusDao_Impl.kt:340)
    at androidx.room.CoroutinesRoom$Companion.execute(CoroutinesRoom.kt:56)
    at com.keylesspalace.tusky.db.dao.TimelineStatusDao_Impl.insert(TimelineStatusDao_Impl.kt:340)
    at com.keylesspalace.tusky.components.notifications.NotificationsRemoteMediator.replaceNotificationRange(NotificationsRemoteMediator.kt:169)
    at com.keylesspalace.tusky.components.notifications.NotificationsRemoteMediator.access$replaceNotificationRange(NotificationsRemoteMediator.kt:36)
    at com.keylesspalace.tusky.components.notifications.NotificationsRemoteMediator$load$3.invokeSuspend(NotificationsRemoteMediator.kt:109)
    at com.keylesspalace.tusky.components.notifications.NotificationsRemoteMediator$load$3.invoke(Unknown Source:8)
    at com.keylesspalace.tusky.components.notifications.NotificationsRemoteMediator$load$3.invoke(Unknown Source:2)
    at androidx.room.RoomDatabaseKt$withTransaction$transactionBlock$1.invokeSuspend(RoomDatabaseExt.kt:62)
    at androidx.room.RoomDatabaseKt$withTransaction$transactionBlock$1.invoke(Unknown Source:8)
    at androidx.room.RoomDatabaseKt$withTransaction$transactionBlock$1.invoke(Unknown Source:4)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:61)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
    at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
    at androidx.room.RoomDatabaseKt$startTransactionCoroutine$2$1$1.invokeSuspend(RoomDatabaseExt.kt:103)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
    at androidx.room.RoomDatabaseKt$startTransactionCoroutine$2$1.run(RoomDatabaseExt.kt:99)
    at androidx.room.TransactionExecutor.execute$lambda$1$lambda$0(TransactionExecutor.kt:36)
    at androidx.room.TransactionExecutor.$r8$lambda$FZWr2PGmP3sgXLCiri-DCcePXSs(Unknown Source:0)
    at androidx.room.TransactionExecutor$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)
```

It looks kinda weird because "x just posted" has a different user than
the actual post, but it works for groups I guess? And definitely better
than crashing.

<img
src="https://github.com/user-attachments/assets/8110ff17-674d-4f36-8df0-453a666856a6"
width="320"/>

closes #4563
2024-09-02 20:00:27 +02:00
Konrad Pozniak 4d73a3c2e3
Fix detecting urls (#4642)
closes #4641
2024-09-02 19:56:38 +02:00
Konrad Pozniak 31e4f08966
fix account switching (#4636)
closes #4631 
closes #4629 

and other weirdness introduced in Tusky 26.1.
I did a lot of testing on 2 physical devices and multiple emulators. It
definitely is better than before, but probably still not perfect.
2024-09-02 19:49:22 +02:00
andrewhamilton0 74d479c3dc
Fixes issue where alt text positioning covers video controller (#4632)
Fixes issue where alt text positioning covers video controller
Also adds scroll view for more responsive scrolling
closes #4165
2024-09-02 18:39:23 +02:00
andrewhamilton0 49fbe1f408
Minimizes keyboard on search screen (#4633)
Adds feature if user clicks on toolbar, on the pages box, or on the tabs
buttons that the keyboard will minimize and focus will be taken off of
search bar.

Further addresses issue #4573
2024-09-01 13:28:55 +02:00
Quentí 14560fe24d Translated using Weblate (Occitan)
Currently translated at 99.3% (647 of 651 strings)

Translated using Weblate (Occitan)

Currently translated at 98.3% (640 of 651 strings)

Co-authored-by: Quentí <quentinantonin@free.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
2024-08-27 17:37:06 +00:00
XoseM 3ce49da0cc Translated using Weblate (Galician)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2024-08-22 04:07:10 +00:00
Konrad Pozniak f3732cc48e
Release 26.1 (#4614) 2024-08-21 19:48:46 +02:00
Ihor Hordiichuk aa1c208551 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2024-08-20 02:07:10 +00:00
Konrad Pozniak e23686ec70
fix timeline jumping around when new posts are inserted at the top (#4619)
This fixes a bug where the timeline would jump to the position of a
previously clicked "load more" when new post are inserted at the top
after swiping to refresh.

This only happens when "Reading order" is set to "Oldest first".

The problem is that updateReadingPositionForOldestFirst (which consumes
the marker to which it should jump) is called from onItemRangeInserted.
But onItemRangeInserted is not called everytime a "load more" is
clicked, leaving the marker active, causing a jump the next time
onItemRangeInserted is called.

I am not sure this fixes all cases of the various jumping bugs that have
been reported recently as this was the only one I could reliably
reproduce.

Related to https://github.com/tuskyapp/Tusky/issues/4493
2024-08-19 20:53:11 +02:00
Konrad Pozniak 3f2b648b19
fix "load more" progressbar sometimes not showing up (#4618)
I don't know why exactly, but when the ViewHolder gets recycled and the
ProgressBar is set to visible again, it just doesn't show anything. It
seems to be a bug in the platform ProgressBar, and it doesn't happen on
all devices. Replacing it with a CircularProgressIndicator fixes the bug
and looks the same.
Reported here:
https://github.com/tuskyapp/Tusky/issues/4493#issuecomment-2182407513
2024-08-19 20:52:57 +02:00
Weblate af581b883c
Translations update from Weblate (automated) (#4617)
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: XoseM <xosem@disroot.org>
2024-08-18 17:33:40 +02:00
XoseM 04dcd91dfc Translated using Weblate (Galician)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2024-08-14 16:49:58 +00:00
Ümit Solmaz 5c9999d2bb Translated using Weblate (Turkish)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-08-14 16:49:58 +00:00
fin-w 46ddd6cddb Translated using Weblate (Welsh)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: fin-w <fin-w@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-08-14 16:49:58 +00:00
Manuel 2ad52c4c50 Translated using Weblate (Italian)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Manuel <mannivuwiki@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
2024-08-14 16:49:58 +00:00
Hồ Nhất Duy 2a48895725 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2024-08-14 16:49:58 +00:00
Eric 9f7ece346c Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Eric <ekhfcxwuvxqfdb@hldrive.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2024-08-14 16:49:58 +00:00
Danial Behzadi 336659eab8 Translated using Weblate (Persian)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2024-08-14 16:49:58 +00:00
Konrad Pozniak c7387c7b52
prevent mixup of account timelines (#4599)
This does 2 things:

- Removes `AccountSwitchInterceptor`, the main culprit for the bug. APIs
can no longer change their base url after they have been created. As a
result they are not Singletons anymore.
- Additionally, I refactored how MainActivity handles Intents to make it
less likely to have multiple instances of it active.

Here is how I could reliably reproduce the bug:

- Be logged in with account A and B
- Write a post with account A, cancel it before it sends (go into flight
mode for that)
- Switch to account B
- Open the "this post failed to send" notification from account A,
drafts will open
- Go back. You are in the MainActivity of account A, everything seems
fine.
- Go back again. You are in the old, now broken MainActivity of account
B. It uses the database of account B but the network of account A.
Refreshing will show posts from A.

closes #4567 
closes #4554
closes #4402 
closes #4148
closes #2663
and possibly #4588
2024-08-14 18:58:12 +02:00
Konrad Pozniak 0d07299a3a
trust ISRG root certificates to make Tusky work on Android 7 again (#4609)
[Let's encrypt had to make some changes to their
signing](https://letsencrypt.org/2023/07/10/cross-sign-expiration.html),
as a result Android 7 doeesn't have the root certificates necessary to
trust Let's encrypt signed certificates anymore. Since most Fedi
instances use Let's encrypt, that is a problem. To work around we can
add the certificates to Tusky directly.
Details [here](https://stackoverflow.com/a/78309587).

closes #4607
2024-08-11 12:59:37 +02:00
Konrad Pozniak dfd83f3080
show correct icon for direct as default reply privacy (#4594) 2024-08-10 09:46:53 +02:00
Cathal Garvey 1cf860ff91 Translated using Weblate (Irish)
Currently translated at 60.6% (395 of 651 strings)

Co-authored-by: Cathal Garvey <cathalgarvey@cathalgarvey.me>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ga/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
GunChleoc e40ea2bef7 Translated using Weblate (Gaelic)
Currently translated at 92.0% (599 of 651 strings)

Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Ümit Solmaz 6132108fd5 Translated using Weblate (Turkish)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Deleted User c06e2daf6b Translated using Weblate (German)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Deleted User <noreply+322@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Deleted User 3c39c69642 Translated using Weblate (German)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Deleted User <noreply+321@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Hồ Nhất Duy 2764b4519a Translated using Weblate (Vietnamese)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Eric 80a66f7b2a Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Eric <ekhfcxwuvxqfdb@hldrive.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Manuel 0a23fccd69 Translated using Weblate (Italian)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Manuel <mannivuwiki@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Danial Behzadi 534e760843 Translated using Weblate (Persian)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Connyduck 83a676bc21 Translated using Weblate (German)
Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (German)

Currently translated at 99.8% (650 of 651 strings)

Co-authored-by: Connyduck <weblate@connyduck.at>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
fin-w 0bfa7606d2 Translated using Weblate (Welsh)
Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: fin-w <fin-w@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
XoseM 4d960a89ad Translated using Weblate (Galician)
Currently translated at 100.0% (648 of 648 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Ihor Hordiichuk e34dceec48 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (648 of 648 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Deleted User 562f76f08a Translated using Weblate (German)
Currently translated at 100.0% (648 of 648 strings)

Co-authored-by: Deleted User <noreply+320@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2024-08-10 07:16:34 +00:00
Konrad Pozniak ce48caa818
remove "default" from posting defaults preference names (#4602)
This makes the interface less cluttered and matches Mastodon. The
"default" is already in the preference group title, I think this is
clear enough.

Before:

![Screenshot_20240807_172653](https://github.com/user-attachments/assets/c72dde12-91b9-4c0e-b2a4-6802dfcf1925)

After:

![Screenshot_20240807_172240](https://github.com/user-attachments/assets/538c89ec-648d-4ef1-8f78-5c2cf951a039)

Mastodon:
<img width="844" alt="Screenshot 2024-08-07 at 17 21 11"
src="https://github.com/user-attachments/assets/601b231e-1f94-4898-b8f3-7eaf7ebe640c">
2024-08-10 09:24:28 +02:00
Konrad Pozniak b68e9760fb
fix translating boosts in home timeline (#4590)
fixes https://github.com/tuskyapp/Tusky/issues/4589
2024-08-06 20:10:38 +02:00
Konrad Pozniak 892801b83a
add more options to default reply visibility setting (#4568)
This adds `direct` and `match_default_post_visibility` as options to the
default reply visibility setting. `match_default_post_visibility` will
be the default for new accounts.

closes https://github.com/tuskyapp/Tusky/issues/4555

<img
src="https://github.com/user-attachments/assets/b256ff32-cd49-4274-903b-96da96451e0e"
width="320"/>
2024-08-02 17:15:10 +02:00
Willow 18b943fef5
Bind account early in timeline & notification view models (#4577)
This will make it less likely that data from different accounts will get
mixed up.

I checked the codepaths and we shouldn't hit viewModel if account is not
there but this is still a bit of risk to assume that so I'll investigate
if we can pass in more things and use DI to make it more secure

---------

Co-authored-by: Conny Duck <git@connyduck.at>
2024-08-02 17:13:32 +02:00
andrewhamilton0 0f3dd64c79
Updates searchView in SearchActivity to clear focus after search (#4578)
Addresses issue #4573. Updates searchView in SearchActivity to clear
focus when a user makes a search. This allows the keyboard to not keep
popping up after a user goes back to search screen after clicking on a
searched item.
2024-07-20 10:29:44 +02:00
Christophe Beyls 12040b90fb
fix: RequestBuilder.submitAsync() throwing an Exception if the Glide request is restarted (#4569)
This is the third attempt to fix `RequestBuilder.submitAsync()`. For the
rationale, see the comments of #4436.

We now clear the continuation reference after resuming it, to make sure
that:
1) It will only be resumed once
2) It will not leak the coroutine when Glide keeps the `Request` around.
2024-07-14 09:01:01 +02:00
Eric 0acdcdd1a2 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (648 of 648 strings)

Co-authored-by: Eric <ekhfcxwuvxqfdb@hldrive.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2024-07-12 09:01:12 +00:00
Konrad Pozniak a8202d8a41
fix default post privacy setting sometimes showing the value of the wrong account (#4564)
Without the `isPersistent = false` flag the preference is saved to
SharedPreferences in addition to the account and overrides the shown
value. So it would always show the value of the last account it was set
to. It was working fine though, only the shown value was wrong.

https://social.sitedethib.com/@Claire/112769984398891581
2024-07-12 11:06:53 +02:00
Konrad Pozniak 235b55d8d6
fix translations not working on instances where domain does not match instance name (#4560)
https://social.froonix.org/@cs/112767747835228296

We were caching the instance info with the instance name as the key and
then look it up with the actual domain and those do not always match so
the check if translation is supported fails. fnx.li vs
social.froonix.org in this case.
2024-07-12 11:06:39 +02:00
Connyduck b968396fa7 Translated using Weblate (German)
Currently translated at 100.0% (648 of 648 strings)

Co-authored-by: Connyduck <weblate@connyduck.at>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2024-07-12 07:46:12 +00:00
Konrad Pozniak fcd6e9c67b
fix updating boosts in network timeline (#4549)
re: https://infosec.exchange/@webhat/112745609655586468

Boost were not correctly handled here, probably because they are only on
profile timelines which I rarely check. This makes sure likes and boosts
get correctly set to posts even when they are boosts.
2024-07-12 08:59:43 +02:00
Conny Duck 000af7fb94
Release 123 2024-07-07 19:56:51 +02:00