Commit Graph

5296 Commits

Author SHA1 Message Date
Conny Duck 1eca92a349
Merge branch 'main' into develop 2024-05-04 20:55:39 +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
Christophe Beyls ad1afdd241
Refactor permissions requests to use ActivityResultContract (#4391)
The app currently uses a custom callback system for requesting
permissions, located in `BaseActivity`.
This code doesn't work when the activity gets re-created before the
permission is granted: the callback will be lost with the Activity and
no action will be performed after the permission is granted.

To avoid these issues while still simplifying the code, Google
recommends to use the ActivityResultContract APIs to request
permissions, which allow to register persistent callbacks. This pull
request removes the legacy API and replaces the calls with
`registerForActivityResult(ActivityResultContracts.RequestPermission())`.

- `ActivityResultContracts.RequestPermission` will check if the
permission is already granted and call the callback synchronously when
possible. So this check doesn't need to be performed anymore.
- In `SearchStatusesFragment` and `SFragment`, the download action to
launch after granting the permission requires an argument (a list of
media URLs). This argument is temporarily stored in a Fragment field and
saved and restored as part of the instance state, so the action can
properly resume after an Activity re-creation.
2024-05-03 21:42:35 +02:00
Konrad Pozniak b2c0b18c8e
Refactor notifications to Kotlin & paging (#4026)
This refactors the NotificationsFragment and related classes to Kotlin &
paging.
While trying to preserve as much of the original behavior as possible,
this adds the following improvements as well:
- The "show notifications filter" preference was added again
- The "load more" button now has a background ripple effect when clicked
- The "legal" report category of Mastodon 4.2 is now supported in report
notifications
- Unknown notifications now display "unknown notification type" instead
of an empty line

Other code quality improvements:
- All views from xml layouts are now referenced via ViewBindings
- the classes responsible for showing system notifications were moved to
a new package `systemnotifications` while the classes from this
refactoring are in `notifications`
- the id of the local Tusky account is now called `tuskyAccountId` in
all places I could find

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

---------

Co-authored-by: Zongle Wang <wangzongler@gmail.com>
2024-05-03 18:27:10 +02:00
renovate[bot] 3bbf96b057
Update dependency com.android.application to v8.4.0 (#4403)
[![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.2` -> `8.4.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.application/8.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.application/8.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.application/8.3.2/8.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.application/8.3.2/8.4.0?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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 13:53:05 +02:00
renovate[bot] 5b312c22ff
Update dependency androidx.core:core-ktx to v1.13.1 (#4397)
[![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.core:core-ktx](https://developer.android.com/jetpack/androidx/releases/core#1.13.1)
([source](https://cs.android.com/androidx/platform/frameworks/support))
| `1.13.0` -> `1.13.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.core:core-ktx/1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.core:core-ktx/1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.core:core-ktx/1.13.0/1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.core:core-ktx/1.13.0/1.13.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMzMS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 13:46:39 +02:00
renovate[bot] 1aa2159754
Update dependency com.google.android.material:material to v1.12.0 (#4407)
[![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.google.android.material:material](https://togithub.com/material-components/material-components-android)
| `1.11.0` -> `1.12.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.android.material:material/1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.android.material:material/1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.android.material:material/1.11.0/1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.android.material:material/1.11.0/1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>material-components/material-components-android
(com.google.android.material:material)</summary>

###
[`v1.12.0`](https://togithub.com/material-components/material-components-android/releases/tag/1.12.0)

[Compare
Source](https://togithub.com/material-components/material-components-android/compare/1.11.0...1.12.0)

### What's new since 1.11.0

- `Slider` and `Progress Indicator` have been updated to better support
Non-Text Contrast Accessibility requirements.
- Predictive Back Fragment/View support added to Material motion
transitions (`MaterialSharedAxis`, `MaterialFadeThrough`,
`MaterialFade`, `MaterialElevationScale`).

#### Important

Required `minSdkVersion` is now 19 or higher, for Material and AndroidX
([blog
post](https://android-developers.googleblog.com/2023/10/androidx-minsdkversion-19.html)).

#### Dependency Updates

| Dependency | Previous version | New version |
| - | - | - |
| androidx.transition | 1.2.0 | 1.5.0 |

#### Library Updates

-   `Gradle`
- Update library minSdkVersion to 19.
([`1bbb43d`](1bbb43d155))
- Upgrade to //third_party/gradle to 8.4
([`1756f23`](1756f233ec))
-   `Carousel`
- Shifted keylines in contained strategies when there exists padding,
and clipToPadding=false
([`1ef42e2`](1ef42e2f23))
- Fixed Javadoc formatting error in `FullScreenCarouselStrategy` class
documentation.
([`a0a1c6e`](a0a1c6e044))
- Added support for cross axis wrap_content RecyclerViews
([`e88a1b9`](e88a1b98d2))
- Added documentation recommending snapping for multi-browse strategy
([`9e64a1f`](9e64a1f5f6))
- Add attributes to change small item size
([`92a5444`](92a5444de9))
-   `CollapsingToolbarLayout`
- Fix text shadow fading when transitioning between expanded and
collapsed states
([`7674e12`](7674e12ea8))
-   `Checkbox`
- Updated string translations
([`198e08c`](198e08cf5e))
-   `Dialog`
- Unified scrim opacity in Material themes/theme overlays.
([`f3e4439`](f3e4439ca6))
-   `Divider`
- Fixed divider instantly appearing or disappearing on insertion or
removal
([`ef4a0c5`](ef4a0c5e36))
-   `i18n`
- Update translated strings
([`a8307ef`](a8307ef792))
-   `MaterialDatePicker`
- Fix date validation on Samsung devices
([`5aa6edf`](5aa6edfaed))
-   `MaterialAutoCompleteTextView`
- Enabled switch access in MaterialAutoCompleteTextView.
([`14a7b40`](14a7b40363))
-   `NavigationDrawer`
- Fixed wrong item selected after click
([`a3af20a`](a3af20a869))
-   `NavigationRail`
- Added label padding for when the label is long enough to reach the
sides of the nav rail
([`2439dc0`](2439dc0e81))
- Increased padding in between items as per design specs
([`16eca7e`](16eca7eef3))
-   `Predictive Back`
- Animated corners during predictive back when no drawerLayoutCornerSize
is set
([`c8b9b1c`](c8b9b1c0bb))
-   `ProgressIndicator`
- Updated inactive track color from primary container to secondary
container.
([`c8cb0c6`](c8cb0c6037))
- Updated the setter of track thickness to not update track corner
radius.
([`540f5ee`](540f5ee983))
- Added the limit to not have stop indicator size bigger than track
thickness.
([`689e04f`](689e04f9ed))
- Fixed the rounded ends overlapping bug with semi-transparent
track/indicator color in Circular default style.
([`8167c11`](8167c115e3))
- Removed the call to draw a transparent full track.
([`3f80fdb`](3f80fdb9e1))
- Flipped the canvas for different circular directions.
([`bcc27a3`](bcc27a3638))
- Split stop indicator drawing from indicator drawing.
([`76207cb`](76207cb270))
- Added ActiveIndicator to improve readability.
([`6fd920a`](6fd920a2c1))
- Fixed ESCAPE animation in linear and added ESCAPE animation in
circular.
([`98284e7`](98284e74ad))
- Updated to use the same drawing delegate object between determinate
drawable and indeterminate drawable to prevent inconsistent drawings
when specs update.
([`52b4845`](52b48450fc))
- Added missing graphics updates when spec changes.
([`93b3010`](93b30109b0))
- Update styles for new Accessibility updates
([`15b533f`](15b533fffb))
- Added static drawable for Circular type when system animator is
disabled.
([`22e054b`](22e054ba68))
-   `Search`
- Excluded icons from search bar handwriting bounds
([`387f59b`](387f59b706))
- Made `searchbar_scrolling_view_behavior` string public
([`ce386e4`](ce386e4c20))
- Updated string translations
([`198e08c`](198e08cf5e))
-   `SideSheet`
- Moved the modal side sheet default width/height into style so they can
be customized
- Updated string translations
([`198e08c`](198e08cf5e))
-   `Slider`
- Made tick size defaults to the stop indicator size if set
([`92bc02c`](92bc02c37c))
- Fixed incorrect style of stop indicators near handles
([`d61cffd`](d61cffd7eb))
- Resolved issues that crash when assigning a large value to `valueTo`
([`4d1b9e5`](4d1b9e58a5))
- Updated the track drawing for some corner cases.
([`10484df`](10484df407))
- Fixed ripple not transparent on API 33
([`cd4f618`](cd4f618d38))
- Updated documentation
([`a641e18`](a641e18b6a))
- Updated styles
([`c218b3c`](3b278d7097))
- Fixed slider label not moving while scrolling
([`144b515`](144b5159ce))
-   `Tabs`
- Fixed title being announced twice when there's a badge in TalkBack
mode.
([`aaa7034`](aaa7034cbf))
-   `Theming`
- Add NoActionBar dynamic color themes
([`81d1b77`](81d1b772b9))
- Update Shape Theming bottom sheet text color
([`8ca016f`](8ca016fb01))
-   `Tokens`
- Update tokens to v4.0.0.
([`88acfcd`](88acfcdb63))
- Added formatting to break long lines and differentiate different
comments.
([`857d6a2`](857d6a2fd9))
-   `TopAppBar`
- Use an accessibility delegate to add and perform actions
([`929c80f`](929c80f753))
- Fixed compress effect clipping on API 21-24
([`2ac8c1c`](2ac8c1cbf6))
-   `TextInputLayout`
- Limited the min height reset in text change listener only when line
count changes.
([`9b9449c`](9b9449cde1))
- Fixed unnecessary min height when losing focus with multiple lines.
([`4a2654a`](4a2654a3f3))
-   `Transitions / Motion`
- Updated androidx transition dep to version 1.5.0-beta01
([`8c63848`](8c63848829))
- Added predictive fade through fragment transition demo to Catalog.
([`6092a7d`](6092a7dfe9))
- Added titles to fade through demo fragments in Catalog.
([`104043c`](104043caee))
- Added predictive transition support for fragments and views to the
Material motion library, and enabled it in shared axis fragment
transition demo.
([`8ccec33`](8ccec334bd))

#### Full list of release notes

-
[1.12.0-alpha01](https://togithub.com/material-components/material-components-android/releases/tag/1.12.0-alpha01)
-
[1.12.0-alpha02](https://togithub.com/material-components/material-components-android/releases/tag/1.12.0-alpha02)
-
[1.12.0-alpha03](https://togithub.com/material-components/material-components-android/releases/tag/1.12.0-alpha03)
-
[1.12.0-beta01](https://togithub.com/material-components/material-components-android/releases/tag/1.12.0-beta01)
-
[1.12.0-rc01](https://togithub.com/material-components/material-components-android/releases/tag/1.12.0-rc01)

#### Full list of changes

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMzEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMzMS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 13:25:26 +02:00
renovate[bot] 50b17a1d74
Update dependency androidx.fragment:fragment-ktx to v1.7.0 (#4406)
[![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.fragment:fragment-ktx](https://developer.android.com/jetpack/androidx/releases/fragment#1.7.0)
([source](https://cs.android.com/androidx/platform/frameworks/support))
| `1.6.2` -> `1.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.fragment:fragment-ktx/1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.fragment:fragment-ktx/1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.fragment:fragment-ktx/1.6.2/1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.fragment:fragment-ktx/1.6.2/1.7.0?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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMzEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMzMS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 13:25:16 +02:00
Konrad Pozniak 71424401a1
switch all string placeholders to positional format (#4387)
closes #3297
2024-05-03 13:22:34 +02:00
Konrad Pozniak d5a01f671c
refactor accountUpdateSource from Call to coroutine (#4386)
It is the last place where we used a Call 🥳
2024-05-03 13:22:04 +02:00
Konrad Pozniak f8a25f896b
upgrade androidx-core to 1.13.0 (#4384)
https://developer.android.com/jetpack/androidx/releases/core#1.13.0
2024-05-03 13:21:49 +02:00
Konrad Pozniak 36d982a359
upgrade androidx-activity to 1.9.0 (#4383)
https://developer.android.com/jetpack/androidx/releases/activity#1.9.0
2024-05-03 13:21:37 +02:00
Christophe Beyls 76c6ec5510
Show tooltips instead of Toasts when long-pressing attachment images (#4382)
- Use `TooltipCompat.setTooltipText()` instead of setting an
`OnLongClickListener` showing a Toast, to show the attachment
description. This method will display native tooltips on API 26+, and
set an `OnLongClickListener` on older versions to display a special
Toast anchored to the view. In both cases this provides a better user
experience.
- Simplify `Attachment.getFormattedDescription()` by using Kotlin's
`Duration`. Since it's an inline class, no extra memory will be
allocated on the heap. Also, ensure that the calculation of minutes and
hours use the rounded number of seconds instead of the non-rounded one.
2024-05-03 13:21:02 +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