Commit Graph

5290 Commits

Author SHA1 Message Date
Conny Duck bf9be47f0f
Release 121 2024-05-10 13:31:40 +02:00
Konrad Pozniak f2d7de0144
fix crash in AccountListFragment (#4430)
Steps to reproduce: When viewing an account list, very quickly rotate
the screen multiple times. I found this easier to do with an emulator,
just spam the rotation buttons.
```
java.lang.IllegalStateException: Fragment AccountListFragment{50bbc6c} (8a3e6922-e855-45a7-8a49-c9d16e21e438) did not return a View from onCreateView() or this was called before onCreateView().
	at androidx.fragment.app.Fragment.requireView(Fragment.java:2063)
	at com.keylesspalace.tusky.util.ViewLifecycleLazy.getValue(ViewBindingExtensions.kt:32)
	at com.keylesspalace.tusky.components.accountlist.AccountListFragment.getBinding(AccountListFragment.kt:75)
	at com.keylesspalace.tusky.components.accountlist.AccountListFragment.onFetchAccountsFailure(AccountListFragment.kt:390)
	at com.keylesspalace.tusky.components.accountlist.AccountListFragment.access$onFetchAccountsFailure(AccountListFragment.kt:63)
	at com.keylesspalace.tusky.components.accountlist.AccountListFragment$fetchAccounts$2.invokeSuspend(AccountListFragment.kt:333)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:230)
	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:7872)
	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:936)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@260dcb1, Dispatchers.Main.immediate]
```
2024-05-10 12:57:54 +02:00
Konrad Pozniak 5137bbfade
fix another crash in ShareShortcutHelper (#4431)
Glide sometimes calls the callback more than once (for the placeholder,
then for the actual image), but a coroutine can only resume once.

```
Exception java.lang.IllegalStateException:
  at kotlinx.coroutines.CancellableContinuationImpl.alreadyResumedError (CancellableContinuationImpl.kt:555)
  at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl (CancellableContinuationImpl.kt:520)
  at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default (CancellableContinuationImpl.kt:493)
  at kotlinx.coroutines.CancellableContinuationImpl.resumeWith (CancellableContinuationImpl.kt:364)
  at com.keylesspalace.tusky.util.GlideExtensionsKt$submitAsync$2$target$1.onResourceReady (GlideExtensions.kt:39)
  at com.bumptech.glide.request.SingleRequest.onResourceReady (SingleRequest.java:650)
  at com.bumptech.glide.request.SingleRequest.onResourceReady (SingleRequest.java:596)
  at com.bumptech.glide.request.SingleRequest.begin (SingleRequest.java:243)
  at com.bumptech.glide.manager.RequestTracker.resumeRequests (RequestTracker.java:115)
  at com.bumptech.glide.RequestManager.resumeRequests (RequestManager.java:339)
  at com.bumptech.glide.RequestManager.onStart (RequestManager.java:364)
  at com.bumptech.glide.manager.ApplicationLifecycle.addListener (ApplicationLifecycle.java:15)
  at com.bumptech.glide.RequestManager$1.run (RequestManager.java:84)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:8893)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:608)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)
```

While removing the placeholder fixes the problem here, we should
probably put some safeguards into `submitAsync` so that this can't
happen again elsewhere. Any ideas how to do that, @cbeyls?
2024-05-10 12:57:44 +02:00
Konrad Pozniak f483cf7f29
don't load custom emojis in their full size (#4429)
This should save quite some memory, but most importantly it gets rid of
this crash:

```
java.lang.RuntimeException: Canvas: trying to draw too large(121969936bytes) bitmap.
           at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:266)
           at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:94)
           at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:549)
           at com.keylesspalace.tusky.util.EmojiSpan.draw(CustomEmojiHelper.kt:131)
           ...
```
2024-05-10 12:57:27 +02:00
Konrad Pozniak ba575dbfc6
make Status.filtered nullable to make some weird api implementations work again (#4426)
closes https://github.com/tuskyapp/Tusky/issues/4424
2024-05-10 12:52:42 +02:00
Konrad Pozniak dc4fd8f1d0
add default value to Translation.mediaAttachments to fix translation on some servers (#4422)
see https://github.com/tuskyapp/Tusky/pull/4307#issuecomment-2093827027
2024-05-10 12:35:50 +02:00
Conny Duck 7e9e729331
Release 120 2024-05-04 20:20:36 +02:00
Konrad Pozniak c10f82ffa6
[v25.1] fix crash when glide fails to load avatar in ShareShortcutHelper (#4417)
🙄 
fixes #4416
2024-05-04 18:36:39 +02:00
Konrad Pozniak 056aaa7e0e
[v25.1] fix crash when exceeding max shortcut number (#4415)
I made a mistake in https://github.com/tuskyapp/Tusky/pull/4389 🙄 

With `addDynamicShortcuts` the limit can still be exceeded,
`setDynamicShortcuts` is what we want.

Also, `setLongLived` says:

> Sets if a shortcut would be valid even if it has been
unpublished/invisible by the app (as a dynamic or pinned shortcut). If
it is long lived, it can be cached by various system services even after
it has been unpublished as a dynamic shortcut.

I don't think we want that so I removed it.
2024-05-04 18:36:26 +02:00
Conny Duck e96ca01dec
Release 119 2024-05-03 12:28:45 +02:00
Konrad Pozniak 88fbf33832
fix crash when quickly unfollowing hashtags (#4404)
Steps to reproduce: Quickly unfollow a bunch of hashtags, try clicking
unfollow buttons multiple times. If you are faster than the network, the
app crashes.

```
java.lang.ArrayIndexOutOfBoundsException: length=20; index=-1
       at java.util.ArrayList.remove(ArrayList.java:506)
       at com.keylesspalace.tusky.components.followedtags.FollowedTagsActivity$unfollow$1.invokeSuspend(FollowedTagsActivity.kt:152)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
       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:7872)
       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:936)
```
2024-05-01 18:43:45 +02:00
Konrad Pozniak b2547c5eef
fix crash in ViewThreadFragment (#4401)
Fragments don't necessarily have the same lifecycle as their views, so
their is a rare race condition when collecting a Flow from the
`lifecycleScope` of the Fragment where the view is already disposed but
the collect lambda is still executed. Accessing the view from such a
lambda can therefore led to a crash.
Collecting from the `viewLifecycleOwner.lifecycleScope` fixes the
problem.

```
Exception java.lang.IllegalStateException:
  at androidx.fragment.app.Fragment.requireView (Fragment.java:2062)
  at com.keylesspalace.tusky.util.ViewLifecycleLazy.getValue (ViewBindingExtensions.kt:32)
  at com.keylesspalace.tusky.components.viewthread.ViewThreadFragment.getBinding (ViewThreadFragment.kt:79)
  at com.keylesspalace.tusky.components.viewthread.ViewThreadFragment.access$getBinding (ViewThreadFragment.kt:67)
  at com.keylesspalace.tusky.components.viewthread.ViewThreadFragment$onViewCreated$3$1.emit (ViewThreadFragment.java:250)
  at com.keylesspalace.tusky.components.viewthread.ViewThreadFragment$onViewCreated$3$1.emit (ViewThreadFragment.java:248)
  at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl (SharedFlow.kt:392)
  at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend (SharedFlow.kt:13)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTaskKt.resume (DispatchedTask.kt:231)
  at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined (DispatchedTask.kt:187)
  at kotlinx.coroutines.DispatchedTaskKt.dispatch (DispatchedTask.kt:159)
  at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume (CancellableContinuationImpl.kt:470)
  at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl (CancellableContinuationImpl.kt:504)
  at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default (CancellableContinuationImpl.kt:493)
  at kotlinx.coroutines.CancellableContinuationImpl.resumeWith (CancellableContinuationImpl.kt:364)
  at kotlinx.coroutines.flow.SharedFlowImpl.tryEmit (SharedFlow.kt:409)
  at kotlinx.coroutines.flow.SharedFlowImpl.emit$suspendImpl (SharedFlow.kt:414)
  at kotlinx.coroutines.flow.SharedFlowImpl.emit (SharedFlow.kt:1)
  at com.keylesspalace.tusky.components.viewthread.ViewThreadViewModel$loadThread$1.invokeSuspend (ViewThreadViewModel.kt:172)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:210)
  at android.os.Looper.loop (Looper.java:299)
  at android.app.ActivityThread.main (ActivityThread.java:8319)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:556)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1038)
```
2024-04-29 19:52:08 +02:00
Konrad Pozniak 05b78a2a00
add content description for bottom nav menu button (#4400) 2024-04-29 19:51:59 +02:00
Konrad Pozniak 320c42fc45
Translations update from Weblate (#4399)
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)
2024-04-29 19:51:48 +02:00
Ümit Solmaz 389059da43 Translated using Weblate (Turkish)
Currently translated at 100.0% (639 of 639 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (639 of 639 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-04-29 11:07:09 +00:00
Connyduck 6bdbbfd4bb Translated using Weblate (German)
Currently translated at 100.0% (639 of 639 strings)

Co-authored-by: Connyduck <weblate@connyduck.at>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2024-04-29 11:07:09 +00:00
Konrad Pozniak 9087b4186f
fix deserializing Akkoma cards (#4395)
Akkoma does not always set all attributes for Cards and when they are
loaded from the database, the app crashes. When they are loaded from the
network, Tusky displays an error. Adding more default values fixes the
problem.

```
com.squareup.moshi.JsonDataException: Required value 'authorName' (JSON name 'author_name') missing at $
    at com.squareup.moshi.internal.Util.missingProperty(Util.java:660)
    at com.keylesspalace.tusky.entity.CardJsonAdapter.fromJson(CardJsonAdapter.kt:122)
    at com.keylesspalace.tusky.entity.CardJsonAdapter.fromJson(CardJsonAdapter.kt:22)
    at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:41)
    at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:70)
    at com.keylesspalace.tusky.components.timeline.TimelineTypeMappersKt.toViewData(TimelineTypeMappers.kt:168)
    at com.keylesspalace.tusky.components.timeline.viewmodel.CachedTimelineViewModel$statuses$2$1.invoke(CachedTimelineViewModel.kt:110)
    at com.keylesspalace.tusky.components.timeline.viewmodel.CachedTimelineViewModel$statuses$2$1.invoke(CachedTimelineViewModel.kt:108)
    at androidx.paging.PagingDataTransforms$map$2$1$1.invokeSuspend(PagingDataTransforms.kt:58)
    at androidx.paging.PagingDataTransforms$map$2$1$1.invoke(Unknown Source:8)
    at androidx.paging.PagingDataTransforms$map$2$1$1.invoke(Unknown Source:2)
    at androidx.paging.PageEvent$Insert.map(PageEvent.kt:128)
    at androidx.paging.PagingDataTransforms$map$2$1.invokeSuspend(PagingDataTransforms.kt:58)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@de2cbd5, Dispatchers.Main.immediate]
```

closes #4393
2024-04-26 19:19:29 +02:00
Konrad Pozniak 338ec54b17
Translations update from Weblate (#4398)
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)
2024-04-26 19:19:17 +02:00
Balázs Meskó cc6925d866 Translated using Weblate (Hungarian)
Currently translated at 100.0% (639 of 639 strings)

Co-authored-by: Balázs Meskó <mesko.balazs@fsf.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky
2024-04-26 04:45:00 +00:00
Konrad Pozniak 197a1f4eda
Translations update from Weblate (#4390)
Translations update from [Weblate](https://weblate.tusky.app) for
[Tusky/Tusky
description](https://weblate.tusky.app/projects/tusky/tusky-app/).



Current translation status:

![Weblate translation
status](https://weblate.tusky.app/widget/tusky/tusky-app/horizontal-auto.svg)
2024-04-25 17:55:22 +02:00
Konrad Pozniak e1904080b0
Translations update from Weblate (#4394)
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)
2024-04-25 17:55:04 +02:00
XoseM 85a27dea3e Translated using Weblate (Galician)
Currently translated at 100.0% (34 of 34 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/gl/
2024-04-25 15:15:38 +00:00
Ümit Solmaz c4c391434f Translated using Weblate (Turkish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/tr/
2024-04-25 15:15:38 +00:00
Hồ Nhất Duy d090222412 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (34 of 34 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/vi/
2024-04-25 15:15:38 +00:00
fin-w 42df5f7c8a Translated using Weblate (Welsh)
Currently translated at 100.0% (34 of 34 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/cy/
2024-04-25 15:15:38 +00:00
Luna Jernberg b8adc818c1 Translated using Weblate (Swedish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/sv/
2024-04-25 15:15:38 +00:00
Konrad Pozniak c55d79562c
fix scheduling posts (#4392)
Mastodon returns different reponses when posting normally and when
scheduling. This was previously ignored silently, but Moshi is more
correct than Gson and fails, which causes the `SendStatusService` to
retry sending forever and a lot of posts are scheduled.
Mastodon should actually ignore multiple attempts at scheduling the same
post, but doesn't so I filed this
https://github.com/mastodon/mastodon/issues/30039

cc @cbeyls
2024-04-25 17:08:57 +02:00
Konrad Pozniak f2ffba1679
never create more than the allowed number of shortcuts (#4389)
The only crash so far in the 25.0-beta1 crash reports. Probably not a
regression though as that code did not change in a while.

```
Exception java.lang.IllegalArgumentException: Max number of dynamic shortcuts exceeded
  at android.os.Parcel.createExceptionOrNull (Parcel.java:3032)
  at android.os.Parcel.createException (Parcel.java:3012)
  at android.os.Parcel.readException (Parcel.java:2995)
  at android.os.Parcel.readException (Parcel.java:2937)
  at android.content.pm.IShortcutService$Stub$Proxy.addDynamicShortcuts (IShortcutService.java:618)
  at android.content.pm.ShortcutManager.addDynamicShortcuts (ShortcutManager.java:240)
  at androidx.core.content.pm.ShortcutManagerCompat.addDynamicShortcuts (ShortcutManagerCompat.java:334)
  at com.keylesspalace.tusky.util.ShareShortcutHelper$updateShortcut$1.invokeSuspend (ShareShortcutHelper.kt:96)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104)
  at android.os.Handler.handleCallback (Handler.java:984)
  at android.os.Handler.dispatchMessage (Handler.java:104)
  at android.os.Looper.loopOnce (Looper.java:238)
  at android.os.Looper.loop (Looper.java:357)
  at android.app.ActivityThread.main (ActivityThread.java:8094)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:957)
Caused by android.os.RemoteException: Remote stack trace:
  at com.android.server.pm.ShortcutService.enforceMaxActivityShortcuts (ShortcutService.java:1768)
  at com.android.server.pm.ShortcutPackage.enforceShortcutCountsBeforeOperation (ShortcutPackage.java:1551)
  at com.android.server.pm.ShortcutService.addDynamicShortcuts (ShortcutService.java:2161)
  at android.content.pm.IShortcutService$Stub.onTransact (IShortcutService.java:281)
  at android.os.Binder.execTransactInternal (Binder.java:1294)
```
2024-04-25 17:08:46 +02:00
Ümit Solmaz 7b2b4612c5 Translated using Weblate (Turkish)
Currently translated at 100.0% (639 of 639 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-04-25 14:29:30 +00:00
Weblate fe7103f2b9
Translations update from Weblate (#4388)
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: Manuel <mannivuwiki@gmail.com>
Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
2024-04-22 19:46:06 +02:00
Weblate 7960db6c78
Translations update from Weblate (#4385)
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: Ümit Solmaz <usnotv@gmail.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
2024-04-21 10:26:36 +02:00
Konrad Pozniak 333beec17d
upgrade to gradle/actions/wrapper-validation@v3 in the other workflow as well 🙄 (#4378)
missed this in #4374
2024-04-21 09:35:59 +02:00
charlag 8e4aab8bae Add F-Droid changelog for Tusky 25 2024-04-20 19:13:49 +02:00
Conny Duck 0362a32163 update changelog 2024-04-20 19:13:49 +02:00
Conny Duck 3fe900c2dd improve changelog layout 2024-04-20 19:13:49 +02:00
Conny Duck 51b7745cee update screenshots 2024-04-20 19:13:49 +02:00
Conny Duck 0a9485f8e9 upgrade version to 25.0 beta 1 2024-04-20 19:13:49 +02:00
Conny Duck a9fe9ba079 update changelog 2024-04-20 19:13:49 +02:00
Christophe Beyls 72ee0b4292
Enable support for WebVTT and TTML subtitles for the player (#4377)
All subtitle formats used to be enabled by default in older versions of
media3.
After the media3 library was upgraded to 1.3.0, Extractors should
specify a `SubtitleParser.Factory` explicitly. By default, no subtitle
formats are supported when using the now deprecated empty constructor of
Extractors.

Limit support to **WebVTT** and **TTML** which are the only true web
standards amongst all the subtitle formats supported by ExoPlayer.

Note that only subtitles embedded in MP4 and WebM files are supported
until Mastodon provides a way to upload subtitles separately.
2024-04-17 21:29:21 +02:00
Konrad Pozniak 4e822c9a0a
larger background for toolbar icons in AccountActivity (#4375)
Looks way better.
[I also wanted to change the color of the status bar, but nobody seems
to like it](https://chaos.social/@ConnyDuck/112178196967742268), so
let's leave it.

before/after
<img
src="https://github.com/tuskyapp/Tusky/assets/10157047/4e93c722-c1a3-4fc4-808f-037a1398a944"
width="260"/> <img
src="https://github.com/tuskyapp/Tusky/assets/10157047/2a58785b-d3f4-4613-9bd9-0e09436f7142"
width="260"/>
2024-04-17 18:41:51 +02:00
renovate[bot] 703641bf06
chore(deps): update plugin com.gradle.develocity to v3.17.2 (#4376)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| com.gradle.develocity | `3.17.1` -> `3.17.2` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.gradle.develocity/3.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.gradle.develocity/3.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.gradle.develocity/3.17.1/3.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.gradle.develocity/3.17.1/3.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tuskyapp/Tusky).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMDEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjMwMS40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-17 18:40:35 +02:00
Konrad Pozniak e15516af68
upgrade to gradle/actions/wrapper-validation@v3 (#4374)
see
https://github.com/gradle/wrapper-validation-action/releases/tag/v3.3.0
2024-04-17 18:40:26 +02:00
Christophe Beyls f69cae2315
Optimize I/O code using Okio - part 2 (#4372)
- Read license resource using Okio inside a coroutine (instead of the
main thread) in `LicenseActivity`
- Use Okio and its buffer system to copy ContentProvider streams and
files to a temporary file in `MediaUploader.prepareMedia()`
- Properly close the input file after copying it to a temporary file in
`MediaUploader.prepareMedia()`
- Properly close sink in case of null body source during file copy in
`Uri.copyToFolder()` in `DraftHelper.kt`
- Add comment explaining the current value of `DEFAULT_CHUNK_SIZE` in
`UriRequestBody.kt` and indent the file properly
- Replace hardcoded `Charset` and `Int` byte size with the proper
constants, and align the `hashCode()` implementation with other
`BitmapTransformation` implementations in
`CompositeWithOpaqueBackground`
- Properly close `InputStream` in case of error during Bitmap size
decoding in `getImageSquarePixels()`
- return `Int` instead of `Long` in `getImageSquarePixels()`, since the
current code simply converts the `Int` result to a `Long` _after_
multiplication and not before (and `Int.MAX_VALUE` is already way above
the maximum number of pixels a decoded Bitmap could return)
- Simplify `getImageOrientation()`
- Add explicit dependency to the Okio library and upgrade it to its
latest version.
2024-04-14 16:39:29 +02:00
Konrad Pozniak 2504f42f7b
Apply window insets to SwipeRefreshLayout in AccountActivity to not obscure spinner (#4371)
before & after

<img
src="https://github.com/tuskyapp/Tusky/assets/10157047/b029f5ff-9b17-48be-b306-a2e7e03ef6f7"
width="240"/>
<img
src="https://github.com/tuskyapp/Tusky/assets/10157047/ea9d3aa8-1f76-4709-9677-f478e2e0064a"
width="240"/>
2024-04-14 16:13:41 +02:00
renovate[bot] 546145da88
chore(deps): update dependency com.android.application to v8.3.2 (#4370)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.android.application](https://developer.android.com/studio/build)
([source](https://android.googlesource.com/platform/tools/base)) |
`8.3.1` -> `8.3.2` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.application/8.3.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.application/8.3.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.application/8.3.1/8.3.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.application/8.3.1/8.3.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tuskyapp/Tusky).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10 21:53:39 +02:00
renovate[bot] d87754fabe
fix(deps): update dependency org.mockito.kotlin:mockito-kotlin to v5.3.1 (#4369)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[org.mockito.kotlin:mockito-kotlin](https://togithub.com/mockito/mockito-kotlin)
| `5.2.1` -> `5.3.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.mockito.kotlin:mockito-kotlin/5.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.mockito.kotlin:mockito-kotlin/5.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.mockito.kotlin:mockito-kotlin/5.2.1/5.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.mockito.kotlin:mockito-kotlin/5.2.1/5.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mockito/mockito-kotlin
(org.mockito.kotlin:mockito-kotlin)</summary>

###
[`v5.3.1`](https://togithub.com/mockito/mockito-kotlin/releases/tag/5.3.1)

[Compare
Source](https://togithub.com/mockito/mockito-kotlin/compare/5.2.1...5.3.1)

<sup><sup>*Changelog generated by [Shipkit Changelog Gradle
Plugin](https://togithub.com/shipkit/shipkit-changelog)*</sup></sup>

##### 5.3.1

- 2024-04-09 - [3
commit(s)](https://togithub.com/mockito/mockito-kotlin/compare/5.3.0...5.3.1)
by Oscar Guillén, Róbert Papp
- Follow-up on
[#&#8203;508](https://togithub.com/mockito/mockito-kotlin/issues/508):
add tests and remove unnecessary methods
[(#&#8203;516)](https://togithub.com/mockito/mockito-kotlin/pull/516)
- Fix broken release
([#&#8203;509](https://togithub.com/mockito/mockito-kotlin/issues/509))
[(#&#8203;514)](https://togithub.com/mockito/mockito-kotlin/pull/514)
- Add support for destructured parameters in answers
[(#&#8203;512)](https://togithub.com/mockito/mockito-kotlin/pull/512)
- Release is broken
[(#&#8203;509)](https://togithub.com/mockito/mockito-kotlin/issues/509)
- Port AdditionalMatchers matchers
[(#&#8203;508)](https://togithub.com/mockito/mockito-kotlin/pull/508)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tuskyapp/Tusky).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10 21:53:30 +02:00
renovate[bot] b5c9356851
fix(deps): update androidx.media3 to v1.3.1 (#4368)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [androidx.media3:media3-ui](https://togithub.com/androidx/media) |
`1.3.0` -> `1.3.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.media3:media3-ui/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.media3:media3-ui/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.media3:media3-ui/1.3.0/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.media3:media3-ui/1.3.0/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[androidx.media3:media3-datasource-okhttp](https://togithub.com/androidx/media)
| `1.3.0` -> `1.3.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.media3:media3-datasource-okhttp/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.media3:media3-datasource-okhttp/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.media3:media3-datasource-okhttp/1.3.0/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.media3:media3-datasource-okhttp/1.3.0/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[androidx.media3:media3-exoplayer](https://togithub.com/androidx/media)
| `1.3.0` -> `1.3.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.media3:media3-exoplayer/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.media3:media3-exoplayer/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.media3:media3-exoplayer/1.3.0/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.media3:media3-exoplayer/1.3.0/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>androidx/media (androidx.media3:media3-ui)</summary>

###
[`v1.3.1`](https://togithub.com/androidx/media/blob/HEAD/RELEASENOTES.md#131-2024-04-11)

[Compare
Source](https://togithub.com/androidx/media/compare/1.3.0...1.3.1)

This release includes the following changes since the
[1.3.0 release](#&#8203;130-2024-03-06):

-   Common Library:
- Add `Format.labels` to allow localized or other alternative labels.
-   ExoPlayer:
- Fix issue where `PreloadMediaPeriod` cannot retain the streams when it
        is preloaded again.
- Apply the correct corresponding `TrackSelectionResult` to the playing
        period in track reselection.
- Start early-enabled renderers only after advancing the playing period
        when transitioning between media items
([#&#8203;1017](https://togithub.com/androidx/media/issues/1017)).
- Add missing return type to proguard `-keepclasseswithmembers` rule for
        `DefaultVideoFrameProcessor.Factory.Builder.build()`
([#&#8203;1187](https://togithub.com/androidx/media/issues/1187)).
-   Transformer:
- Add workaround for exception thrown due to `MediaMuxer` not supporting
        negative presentation timestamps before API 30.
-   Track Selection:
- `DefaultTrackSelector`: Prefer video tracks with a 'reasonable' frame
rate (>=10fps) over those with a lower or unset frame rate. This ensures
the player selects the 'real' video track in MP4s extracted from motion
        photos that can contain two HEVC tracks where one has a higher
        resolution but a very small number of frames
([#&#8203;1051](https://togithub.com/androidx/media/issues/1051)).
-   Extractors:
- Fix issue where padding was not skipped when reading odd-sized chunks
from WAV files
([#&#8203;1117](https://togithub.com/androidx/media/pull/1117)).
- MP3: Populate `Format.averageBitrate` from metadata frames such as
        `XING` and `VBRI`.
- MPEG-TS: Revert a change that aimed to ensure the last frame is
rendered
        by passing the last access unit of a stream to the sample queue
([#&#8203;7909](https://togithub.com/google/ExoPlayer/issues/7909)).
This is due
        to the change causing new problems with I-frame only HLS streams
([#&#8203;1150](https://togithub.com/google/ExoPlayer/issues/1150)) and
H.262 HLS
streams
([#&#8203;1126](https://togithub.com/google/ExoPlayer/issues/1126)).
-   Audio:
- Allow renderer recovery by disabling offload if audio track fails to
        initialize in offload mode.
-   Video:
- Add workaround for a device issue on Galaxy Tab S7 FE, Chromecast with
Google TV, and Lenovo M10 FHD Plus that causes 60fps H265 streams to be
        marked as unsupported
- Add workaround that ensures the first frame is always rendered while
tunneling even if the device does not do this automatically as required
by the API
([#&#8203;1169](https://togithub.com/androidx/media/issues/1169)).
        ([#&#8203;966](https://togithub.com/androidx/media/issues/966)).
- Fix issue where HDR color info handling causes codec misbehavior and
        prevents adaptive format switches for SDR video tracks
([#&#8203;1158](https://togithub.com/androidx/media/issues/1158)).
-   Text:
    -   WebVTT: Prevent directly consecutive cues from creating spurious
        additional `CuesWithTiming` instances from `WebvttParser.parse`
([#&#8203;1177](https://togithub.com/androidx/media/issues/1177)).
-   DRM:
- Work around a `NoSuchMethodError` which can be thrown by the
`MediaDrm`
        framework instead of `ResourceBusyException` or
        `NotProvisionedException` on some Android 14 devices
([#&#8203;1145](https://togithub.com/androidx/media/issues/1145)).
-   Effect:
    -   Improved PQ to SDR tone-mapping by converting color spaces.
-   Session:
- Fix issue where the current position jumps back when the controller
        replaces the current item
        ([#&#8203;951](https://togithub.com/androidx/media/issues/951)).
- Fix issue where `MediaMetadata` with just non-null `extras` is not
        transmitted between media controllers and sessions
([#&#8203;1176](https://togithub.com/androidx/media/issues/1176)).
-   UI:
    -   Fallback to include audio track language name if `Locale` cannot
        identify a display name
        ([#&#8203;988](https://togithub.com/androidx/media/issues/988)).
-   DASH Extension:
- Populate all `Label` elements from the manifest into `Format.labels`
        ([#&#8203;1054](https://togithub.com/androidx/media/pull/1054)).
-   RTSP Extension:
    -   Skip empty session information values (i-tags) in SDP parsing
([#&#8203;1087](https://togithub.com/androidx/media/issues/1087)).
-   Decoder Extensions (FFmpeg, VP9, AV1, MIDI, etc.):
- Disable the MIDI extension as a local dependency by default because it
requires an additional Maven repository to be configured. Users who need
        this module from a local dependency
[can re-enable
it](https://togithub.com/androidx/media/blob/main/README.md#midi-module).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tuskyapp/Tusky).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10 21:53:14 +02:00
renovate[bot] 0a5d277623
chore(deps): update plugin com.gradle.develocity to v3.17.1 (#4367)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| com.gradle.develocity | `3.17` -> `3.17.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.gradle.develocity/3.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.gradle.develocity/3.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.gradle.develocity/3.17/3.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.gradle.develocity/3.17/3.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tuskyapp/Tusky).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10 21:53:05 +02:00
Christophe Beyls 65af26993b
Optimize I/O code using Okio (#4366)
This pull request takes advantage of the Okio library to simplify, fix
or improve performance of some I/O related code in Tusky.

- Return early or throw `FileNotFoundException` early in case
`contentResolver.openInputStream()` returns `null` instead of throwing
`NullPointerException` later. Change the signature of
`Closeable.closeQuietly()` to only accept a non-null `Closeable`.
- Reimplement `Uri.copyToFile()` using Okio. This takes advantage of the
built-in high-performance buffers of the library so a buffer doesn't
need to be allocated or managed manually. The new implementation also
makes sure that the input and output streams are always closed, as the
original code could in some cases return without properly closing a
stream.
- Reimplement `ProgressRequestBody` as `Uri.asRequestBody()` (adding to
the existing extension functions available in the Okio library to create
a `RequestBody`). The new implementation uses Okio's `Buffer` instead of
a manually managed byte array, which allows to avoid copying bytes from
one buffer to the next. The max number of bytes read at once was
increased from 2K to 8K to improve performance. Avoid division by zero
in case `contentLength` is `0`. Finally, this implementation now takes a
`Uri` as input instead of an `InputStream`, because a `RequestBody` must
be replayable in case Okio retries the request, and an `InputStream` can
only be used once.
2024-04-10 21:52:55 +02:00
Konrad Pozniak ee9a9fc51e
Translations update from Weblate (#4363)
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)
2024-04-10 21:47:41 +02:00