When using the database as `PagingSource`, it can happen that there are
null items, e.g. when the user jumps to the top and the items are no
longer in memory and need to be re-queried. We have ignored this fact
until now, leading to subtle bugs where the adapter just shows a
completely empty `ViewHolder`, or worse, a recycled ViewHolder that has
not been updated and shows the wrong post. Usually these are only
visible for a split second but it can take longer in some cases e.g. on
slow devices.
Here is how the placeholders look:
<img
src="https://github.com/user-attachments/assets/58d3434f-916f-44a5-ad82-2a4a759e39d8"
width="320"/>
Note: I would prefer to turn this behavior with the null items off, but
we tried that once and it led to even worse bugs:
https://github.com/tuskyapp/Tusky/pull/4471
Add support for the
[blur](https://docs.joinmastodon.org/entities/Filter/#filter_action)
filter action added in mastodon 4.4.0.
Images and videos on matched posts are hidden by default, and the label
reads "Filtered: ${title of applied filter}".
If a matched post has a preview card, the preview image is also blurred.
~~This is draft for now until I upgrade my instance and test, I've
tested so far with spoofed data.~~
<img width="418" alt="Screenshot of two posts in the timeline with
blurred media. The label reads: Filtered: BLUR"
src="https://github.com/user-attachments/assets/3058e7f7-0dd7-49ad-b7b7-90827e8ea8f1"
/>
### Summary
This pull request updates the delete status API call to support the
optional `delete_media` parameter introduced in Mastodon 4.2.
### Changes
Updated `deleteStatus` function to accept a `delete_media` query
parameter
Fixes#4986
Currently translated at 100.0% (709 of 709 strings)
Translated using Weblate (Russian)
Currently translated at 100.0% (709 of 709 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (709 of 709 strings)
Translated using Weblate (Russian)
Currently translated at 100.0% (709 of 709 strings)
Translated using Weblate (Russian)
Currently translated at 100.0% (709 of 709 strings)
Co-authored-by: Vladyslav Stepanov <mittwerk@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ru/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
Currently translated at 100.0% (709 of 709 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (709 of 709 strings)
Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
To reproduce, login an additional account via Browser login and then
press back. You will find yourself in a broken interface where the
displayed posts don't match the logged-in account. This does not happen
with Tusky login.
Seems like `finishAffinity()` does not work as expected when there is an
Activity of another app (the browser) on the stack.
Fix with the nuclear option (starting a new task). Also remove the
explode animation, as this was broken before (finish needs to be called
after startActivity for the animation to appear) and animations between
tasks don't work in newer Android versions anyway.
Currently translated at 55.4% (393 of 709 strings)
Co-authored-by: Moonshadow <Moonshadow@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/kab/
Translation: Tusky/Tusky
Currently translated at 54.3% (385 of 709 strings)
Translated using Weblate (Kabyle)
Currently translated at 53.3% (378 of 709 strings)
Co-authored-by: Moonshadow <rgebbid@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/kab/
Translation: Tusky/Tusky
Currently translated at 53.3% (378 of 709 strings)
Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/kab/
Translation: Tusky/Tusky
https://layer8.space/@andre/114268763071943595
wtf is this bug 😳
Happens only on Android 15
I have no idea what exactly is going on here, I found this fix by trial
and error. `outsideOverlay` seems to look exactly the same as
`outsideInset` so i hope this is safe.
Fixes#5032
I added all languages that where marked as unused to the locale file.
The only language that maybe is not really worth putting in there is
berber with 36 translations right now.
But in the end those 36 may be better (if they are correct).
This was the last of our fragments that didn't have a ViewModel and
still used the old custom pagination
Additional benefits:
- Way better error handling (the old one didn't even work, in some cases
it would look like success when it really failed)
- smooter scrolling
Currently translated at 100.0% (701 of 701 strings)
Translated using Weblate (Italian)
Currently translated at 100.0% (701 of 701 strings)
Co-authored-by: Manuel <mannivuwiki@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
`UnifiedPush.registerAppWithDialog` will show a dialog when there are 2
or more distributors, for that it needs an activity context but we
passed an application one. I think this is improved in a newer Unified
push library version, will upgrade soon. In the meantime this change
fixes the crash.
```
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:1314)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:421)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:149)
at android.app.Dialog.show(Dialog.java:352)
at org.unifiedpush.android.connector.UnifiedPush.registerAppWithDialog(UnifiedPush.kt:139)
at org.unifiedpush.android.connector.UnifiedPush.registerAppWithDialog$default(UnifiedPush.kt:67)
at com.keylesspalace.tusky.components.systemnotifications.NotificationService.setupPushNotificationsForAccount(NotificationService.kt:775)
at com.keylesspalace.tusky.components.systemnotifications.NotificationService.access$setupPushNotificationsForAccount(NotificationService.kt:76)
at com.keylesspalace.tusky.components.systemnotifications.NotificationService$setupPushNotificationsForAccount$1.invokeSuspend(Unknown Source:15)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7932)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)
```
Currently translated at 100.0% (701 of 701 strings)
Co-authored-by: Anna (cybertailor) Vyalkova <cyber@sysrq.in>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ru/
Translation: Tusky/Tusky
Sometimes a tab is just empty after switching to it, but content appears
as soon as you interact with it.
I found that setting a `offscreenPageLimit` on the `ViewPager2` makes
that issue go away.
This also has the side effect that the content of more tabs is
preloaded, which makes tab switching *feel* different, one does not see
so many loading spinners, content is just there instantly. I'm not sure
if that is desireable but I would like to try it out for a while. If it
happens to be a problem we can still move tab initialization to when it
is actually visible.
When opening the conversations tab with empty cache (i.e. after a frash
login), it would sometimes start with 6 year old messages for me, which
I find very annoying. The issue is that the loading footer is shown
first and the RecyclerView tries to keep it visible when new items are
added. This works around the issue. Note that it does not happen when
there are already some conversations in the cache.