Commit Graph

5336 Commits

Author SHA1 Message Date
Zachary Wander dcb87a4bf7 Add Mastodon Redirect support and "Open Link" share target 2024-05-12 16:12:51 -04:00
Christophe Beyls 45d36a6a87
Update splash screen to properly use the Androidx SplashScreen library (#4413)
The Androidx SplashScreen library is added as a dependency to the
project but isn't properly enabled in the current code. This pull
request configures the splash screen properly.

- Remove `SplashScreenActivity` which is not needed and use
`MainActivity` as main entry point to the application. `MainActivity`
inherits from `BaseActivity` which already detects if no account is
configured and redirects to `LoginActivity` if needed, just like
`SplashScreenActivity`.
- Initialize the SplashScreen library in `MainActivity.onCreate()`.
- Instead of letting the SplashScreen library set the final theme from
the `postSplashScreenTheme` attribute in SplashTheme, let `BaseActivity`
set it according to the user settings.
- When no account is available in `MainActivity.onCreate()`, keep the
splash screen shown until `LoginActivity` appears.
- Disable the slide-in animation when launching `LoginActivity` when no
account is available because the detection happens in `onCreate()` and
an Activity that finishes itself in `onCreate()` will not be drawn, so
the slide-in animation will not be visible either and only
`LoginActivity` will appear.
- Upgrade `core-splashscreen` to 1.2.0-alpha01 which contains a fix for
corrupted app theme on API 31+.
2024-05-12 11:31:47 +02:00
Christophe Beyls f9221b3d75
Improve RequestBuilder.submitAsync() to ensure the coroutine continuation is resumed only once (#4436)
`RequestListener.onResourceReady()` may also be called to provide the
placeholder image when the request is starting or when it is cleared.

Check if the current request is complete (its status set to COMPLETE) to
determine if the Glide resource is for a thumbnail/placeholder or the
final image, and resume the coroutine only for the final image (or in
case of error).
This logic is [borrowed from the Glide Flow
API](a7351b0ecf/integration/ktx/src/main/java/com/bumptech/glide/integration/ktx/Flows.kt (L378)).
2024-05-12 11:25:49 +02:00
Christophe Beyls 11d18e1e70
Upgrade DrawerLayout to 1.2.0 and simplify code (#4412)
The main benefit of upgrading to version 1.2.0 of `DrawerLayout` is ~~to
properly support **predictive back animations**: when initiating a back
gesture on API 33+, the DrawerLayout will animate automatically~~ to
handle back navigation automatically. The predictive back animation of
the menu however depends on `NavigationView` which is not used in the
project.

In addition to the upgrade, simplify DrawerLayout integration:
- Forward key events to the DrawerLayout so it can intercept them and
close itself when needed.
- Don't handle the DrawerLayout closing manually using the
`OnBackPressedCallback` anymore. This is not necessary since the back
event will now be intercepted by the DrawerLayout when needed before
reaching the `OnBackPressedDispatcher`.
- Remove legacy fix for DrawerLayout staying open after Activity
recreation.
2024-05-10 17:14:26 +02:00
renovate[bot] 2ce03c2e89
Update Kotlin (#4427)
[![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.devtools.ksp](https://goo.gle/ksp)
([source](https://togithub.com/google/ksp)) | `1.9.23-1.0.20` ->
`1.9.24-1.0.20` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.devtools.ksp/1.9.24-1.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.devtools.ksp/1.9.24-1.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.devtools.ksp/1.9.23-1.0.20/1.9.24-1.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.devtools.ksp/1.9.23-1.0.20/1.9.24-1.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| org.jetbrains.kotlin.plugin.parcelize | `1.9.23` -> `1.9.24` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin.plugin.parcelize/1.9.24?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlin.plugin.parcelize/1.9.24?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlin.plugin.parcelize/1.9.23/1.9.24?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin.plugin.parcelize/1.9.23/1.9.24?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| org.jetbrains.kotlin.android | `1.9.23` -> `1.9.24` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin.android/1.9.24?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlin.android/1.9.24?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlin.android/1.9.23/1.9.24?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin.android/1.9.23/1.9.24?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[org.jetbrains.kotlinx:kotlinx-coroutines-test](https://togithub.com/Kotlin/kotlinx.coroutines)
| `1.8.0` -> `1.8.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlinx:kotlinx-coroutines-test/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlinx:kotlinx-coroutines-test/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlinx:kotlinx-coroutines-test/1.8.0/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlinx:kotlinx-coroutines-test/1.8.0/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[org.jetbrains.kotlinx:kotlinx-coroutines-android](https://togithub.com/Kotlin/kotlinx.coroutines)
| `1.8.0` -> `1.8.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlinx:kotlinx-coroutines-android/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlinx:kotlinx-coroutines-android/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlinx:kotlinx-coroutines-android/1.8.0/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlinx:kotlinx-coroutines-android/1.8.0/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>google/ksp (com.google.devtools.ksp)</summary>

###
[`v1.9.24-1.0.20`](https://togithub.com/google/ksp/releases/tag/1.9.24-1.0.20)

[Compare
Source](https://togithub.com/google/ksp/compare/1.9.23-1.0.20...1.9.24-1.0.20)

KSP 1.0.20 for kotlin compiler version 1.9.24

</details>

<details>
<summary>Kotlin/kotlinx.coroutines
(org.jetbrains.kotlinx:kotlinx-coroutines-test)</summary>

###
[`v1.8.1`](https://togithub.com/Kotlin/kotlinx.coroutines/blob/HEAD/CHANGES.md#Version-181)

[Compare
Source](https://togithub.com/Kotlin/kotlinx.coroutines/compare/1.8.0...1.8.1)

- Remove the `@ExperimentalTime` annotation from usages of `TimeSource`
([#&#8203;4046](https://togithub.com/Kotlin/kotlinx.coroutines/issues/4046)).
Thanks, [@&#8203;hfhbd](https://togithub.com/hfhbd)!
- Introduce a workaround for an Android bug that caused an occasional
`NullPointerException` when setting the `StateFlow` value on old Android
devices
([#&#8203;3820](https://togithub.com/Kotlin/kotlinx.coroutines/issues/3820)).
- No longer use `kotlin.random.Random` as part of `Dispatchers.Default`
and `Dispatchers.IO` initialization
([#&#8203;4051](https://togithub.com/Kotlin/kotlinx.coroutines/issues/4051)).
- `Flow.timeout` throws the exception with which the channel was closed
([#&#8203;4071](https://togithub.com/Kotlin/kotlinx.coroutines/issues/4071)).
-   Small tweaks and documentation fixes.

##### Changelog relative to version 1.8.1-Beta

- `Flow.timeout` throws the exception with which the channel was closed
([#&#8203;4071](https://togithub.com/Kotlin/kotlinx.coroutines/issues/4071)).
-   Small documentation fixes.

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 16:23:43 +02:00
renovate[bot] 224a3b89de
Update plugin com.gradle.develocity to v3.17.3 (#4435)
[![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.2` -> `3.17.3` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.gradle.develocity/3.17.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.gradle.develocity/3.17.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.gradle.develocity/3.17.2/3.17.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.gradle.develocity/3.17.2/3.17.3?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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 15:56:14 +02:00
Konrad Pozniak 1ad3c74959
increase adaptive_bitmap_inner_size (#4432)
before/after


![Screenshot_20240509_093423](https://github.com/tuskyapp/Tusky/assets/10157047/0f870b6b-5d45-4d87-a33e-41c59459b041)
2024-05-10 15:56:03 +02:00
renovate[bot] df372ce30d
Update plugin ktlint to v12.1.1 (#4428)
[![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.jlleitschuh.gradle.ktlint | `12.1.0` -> `12.1.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jlleitschuh.gradle.ktlint/12.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jlleitschuh.gradle.ktlint/12.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jlleitschuh.gradle.ktlint/12.1.0/12.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jlleitschuh.gradle.ktlint/12.1.0/12.1.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 15:55:54 +02:00
Konrad Pozniak 5cb1e278dc
Translations update from Weblate (#4421)
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-05-10 15:55:28 +02:00
Christophe Beyls dc4ca06551
Replace Dagger-Android with Hilt and remove Kapt (#4423)
Hilt is an annotation processor built on top of Dagger which allows to
remove all the Android dependency injection boilerplate code (currently
around 900 lines) by writing it for us.

Hilt can use KSP instead of Kapt so Kapt can be completely removed from
the project. Kapt is slow, deprecated and has a few compatibility
issues. Removing Kapt will improve build times since no Java stubs have
to be generated for Kotlin classes anymore (Note that KSP also processes
annotations in Java classes so it can completely replace Kapt).

- Remove all modules related to manual dependency injection
configuration.
- Rename `AppModule` to `StorageModule` since it now only contains
configuration to retrieve the DataBase and SharedPreferences.
- Annotate all entry points (Activities, Fragments, BroadcastReceivers
and Services) with `@AndroidEntryPoint`.
- Annotate all injected ViewModels with `@HiltViewModel` and replace the
custom ViewModel Factory with the default one (which integrates with the
one generated by Hilt).
- Add a public field to allow overriding the default
ViewModelProvider.Factory in `BaseActivity` in tests.
- Annotate tested Activities with `@OptionalInject` since Activity tests
currently rely on the Activities not being injected automatically.
- Annotate injected `Context` arguments with `@ApplicationContext`. Hilt
provides the `Context` binding automatically but requires to specify if
the Application or Activity Context is wanted.
- Add WorkManager Hilt integration so all Workers are injected by Hilt
automatically using `HiltWorkerFactory`.
- Lazily initialize WorkManager in `TuskyApplication`.
- Remove Kapt and Kapt workarounds.
- ~~Remove toolchain configuration for Java 21. Toolchains force the
Java bytecode to match the JDK version used to build the project, and
apparently Hilt doesn't run inside the toolchain so cannot process the
source code if the JDK version of the toolchain is higher than the JDK
used to run Gradle. [And configuring a toolchain for an older Java
version causes other
issues](https://jakewharton.com/gradle-toolchains-are-rarely-a-good-idea/).
**Removing toolchains configuration doesn't prevent the project from
being built using JDK 21** or more recent versions but allows to build
the project using older JDKs as well.~~
Added a fix to allow Hilt to properly use the JDK toolchain.
- ~~Set the Java and Kotlin bytecode target to Java 17. The standard
bytecode target for Android projects is usually Java 8 or 11 (any higher
version doesn't provide any benefit but may cause compatibility issues).
However, since the app currently uses a library built against Java 17
bytecode (`networkresult-calladapter`), it needs to target at least Java
17 bytecode as well.~~
- Update the Dagger 2 URL in the licenses screen. Hilt is part of Dagger
2 so the label wasn't changed.
2024-05-10 15:55:07 +02:00
Mārtiņš Bruņenieks 1c48cc43e2 Translated using Weblate (Latvian)
Currently translated at 84.8% (544 of 641 strings)

Co-authored-by: Mārtiņš Bruņenieks <martinsb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translation: Tusky/Tusky
2024-05-10 13:54:16 +00:00
Connyduck bb481cbe95 Translated using Weblate (German)
Currently translated at 99.5% (638 of 641 strings)

Co-authored-by: Connyduck <weblate@connyduck.at>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2024-05-10 13:54:16 +00:00
Ihor Hordiichuk 2bb234b7db Translated using Weblate (Ukrainian)
Currently translated at 100.0% (641 of 641 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2024-05-10 13:54:16 +00:00
fin-w 0cc63d931e Translated using Weblate (Welsh)
Currently translated at 100.0% (641 of 641 strings)

Co-authored-by: fin-w <fin-w@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-05-10 13:54:16 +00:00
Stavros aad1431075 Translated using Weblate (Greek)
Currently translated at 26.6% (171 of 641 strings)

Co-authored-by: Stavros <stavros.daliakopoulos@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/el/
Translation: Tusky/Tusky
2024-05-10 13:54:16 +00:00
Ümit Solmaz f3f26091be Translated using Weblate (Turkish)
Currently translated at 100.0% (641 of 641 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-05-10 13:54:16 +00:00
Quentí 81ae9e612b Translated using Weblate (Occitan)
Currently translated at 97.8% (627 of 641 strings)

Co-authored-by: Quentí <quentinantonin@free.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
2024-05-10 13:54:16 +00:00
Danial Behzadi 6568fd6748 Translated using Weblate (Persian)
Currently translated at 100.0% (641 of 641 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2024-05-10 13:54:16 +00:00
Hồ Nhất Duy 86115375a3 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (641 of 641 strings)

Translated using Weblate (Vietnamese)

Currently translated at 100.0% (639 of 639 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-05-10 13:54:16 +00:00
Weblate c1fe58c48c
Translations update from Weblate (#4420)
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)

---------

Co-authored-by: Conny Duck <git@connyduck.at>
Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
2024-05-10 15:17:40 +02:00
UlrichKu b60e111144
3477 tweak colors for contrast (#3921)
Fixes: #3477

This tweaks two colors: 
* for the dark theme a new slightly darker (timeline) background is
used.
* for the light theme a darker shade of blue is used as highlight color
(`colorPrimary` and `colorSecondary`)

Additional change:
* Use green and red more consistent: use existing colors for the diff
display; move the new light variants to colors.xml like all colors
2024-05-10 14:39:08 +02:00
Christophe Beyls 84fda7bade
Re-enable options menu in NotificationsFragment (#4419)
The menu doesn't show up anymore after merging #4026.
I assume this was unintentional since the Fragment still implements
`MenuProvider`.
2024-05-10 14:26:29 +02:00
Christophe Beyls d1518956e1
Add backwards compatible implementation of overrideActivityTransition() (#4408)
This pull request adds `overrideActivityTransitionCompat()`, a
backwards-compatible version of `Activity.overrideActivityTransition()`
to be called in `Activity.onCreate()` in all Android versions.

This avoids duplicating the transition logic in different places of the
app to support older Android versions (in the activity launching code,
in `Activity.onCreate()` or in `Activity.finish()`).

- On API 34+, the implementation simply delegates to
`Activity.overrideActivityTransition()`.
- On API < 34, the implementation calls
`Activity.overridePendingTransition()` either immediately (opening
transition) or schedules it to be called later when the Activity is
finishing (closing transition).
- Rename `ActivityExensions.kt` to `ActivityExtensions.kt` (fix typo).
2024-05-10 13:59:35 +02:00
Conny Duck 0028ab79c3
Merge branch 'main' into develop
# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/components/notifications/ReportNotificationViewHolder.kt
2024-05-10 13:32:52 +02:00
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
Konrad Pozniak 401ab6d453
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:33:55 +02:00
Konrad Pozniak 836c71b899
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:26:03 +02:00
Konrad Pozniak 4dec228926
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:22:07 +02:00
Konrad Pozniak 3736034952
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:21:48 +02:00
Konrad Pozniak 82817a089b
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:21:37 +02:00
Christophe Beyls 05c7e7b806
Fix various lint warnings (#4409)
- Remove empty file `ExampleInstrumentedTest.java`.
- Replace deprecated `MigrationTestHelper` constructor call.
- Add reified inline extension methods for `Bundle` and `Intent` to
retrieve `Parcelable` and `Serializable` objects by calling the core
`BundleCompat` and `IntentCompat` methods, to allow shorter syntax and
removing the need to pass the class explicitly.
- Replace deprecated `drawable.setColorFilter()` with simpler
`drawable.setTint()` (uses blend mode `SRC_IN` by default, has the same
effect as `SRC_ATOP` when the source is a color).
- Rename shadowed variables (mostly caught exceptions).
- Remove unnecessary `.orEmpty()` on non-null fields.
- Replace `.size() == 0` with `.isEmpty()`.
- Prevent `NullPointerException` when `account.getDisplayName()` is
`null` in `StatusBaseViewHolder.setDisplayName()`.
- Declare `customEmojis` argument as non-null in
`StatusBaseViewHolder.setDisplayName()` because it calls
`CustomEmojiHelper.emojify()` which now requires it to be non-null.
- Prevent `NullPointerException` when no matching filter is found in
`StatusBaseViewHolder.setupFilterPlaceholder()`.
- Remove deprecated call to `setTargetFragment()` (target fragment is
not used anyway).
- Remove deprecated call to `isUserVisibleHint()` and test if the view
has been destroyed instead.
- Remove some unused imports.
- Remove unnecessary casts.
- Rename arguments to supertype names when a warning is shown.
- Prevent a potential memory leak by clearing the
`toolbarVisibilityDisposable` reference in `onDestroyView()`.
2024-05-05 08:34:41 +02:00
Konrad Pozniak 7dc71a5888
Translations update from Weblate (#4410)
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-05-05 08:33:52 +02:00
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
Hồ Nhất Duy 65995e4492 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (639 of 639 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-05-03 19:42:14 +00:00
Manuel a1367037ba Translated using Weblate (Italian)
Currently translated at 100.0% (639 of 639 strings)

Co-authored-by: Manuel <mannivuwiki@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
2024-05-03 19:42:14 +00:00
Anonymous 450fe72983 Translated using Weblate (Latvian)
Currently translated at 84.6% (541 of 639 strings)

Translated using Weblate (Belarusian)

Currently translated at 91.2% (583 of 639 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 98.5% (630 of 639 strings)

Translated using Weblate (Sinhala)

Currently translated at 35.8% (229 of 639 strings)

Translated using Weblate (Galician)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Bulgarian)

Currently translated at 85.2% (545 of 639 strings)

Translated using Weblate (Kurdish (Central))

Currently translated at 60.0% (384 of 639 strings)

Translated using Weblate (Sanskrit)

Currently translated at 76.5% (489 of 639 strings)

Translated using Weblate (Bengali (Bangladesh))

Currently translated at 63.2% (404 of 639 strings)

Translated using Weblate (Irish)

Currently translated at 62.4% (399 of 639 strings)

Translated using Weblate (Gaelic)

Currently translated at 94.5% (604 of 639 strings)

Translated using Weblate (Vietnamese)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Thai)

Currently translated at 62.9% (402 of 639 strings)

Translated using Weblate (Ukrainian)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Kabyle)

Currently translated at 36.7% (235 of 639 strings)

Translated using Weblate (Icelandic)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Hindi)

Currently translated at 53.2% (340 of 639 strings)

Translated using Weblate (Korean)

Currently translated at 54.6% (349 of 639 strings)

Translated using Weblate (Bengali (India))

Currently translated at 59.4% (380 of 639 strings)

Translated using Weblate (Slovenian)

Currently translated at 58.0% (371 of 639 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 92.6% (592 of 639 strings)

Translated using Weblate (Chinese (zh_MO))

Currently translated at 47.1% (301 of 639 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 98.2% (628 of 639 strings)

Translated using Weblate (Turkish)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Swedish)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Russian)

Currently translated at 98.5% (630 of 639 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 86.0% (550 of 639 strings)

Translated using Weblate (Polish)

Currently translated at 84.0% (537 of 639 strings)

Translated using Weblate (Occitan)

Currently translated at 97.0% (620 of 639 strings)

Translated using Weblate (Dutch)

Currently translated at 92.8% (593 of 639 strings)

Translated using Weblate (Japanese)

Currently translated at 96.4% (616 of 639 strings)

Translated using Weblate (Italian)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Hungarian)

Currently translated at 99.6% (637 of 639 strings)

Translated using Weblate (French)

Currently translated at 93.7% (599 of 639 strings)

Translated using Weblate (Persian)

Currently translated at 98.1% (627 of 639 strings)

Translated using Weblate (Basque)

Currently translated at 69.7% (446 of 639 strings)

Translated using Weblate (Spanish)

Currently translated at 91.8% (587 of 639 strings)

Translated using Weblate (Esperanto)

Currently translated at 72.4% (463 of 639 strings)

Translated using Weblate (German)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Welsh)

Currently translated at 99.8% (638 of 639 strings)

Translated using Weblate (Czech)

Currently translated at 73.5% (470 of 639 strings)

Translated using Weblate (Catalan)

Currently translated at 86.5% (553 of 639 strings)

Translated using Weblate (Arabic)

Currently translated at 91.8% (587 of 639 strings)

Co-authored-by: Anonymous <noreply@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ar/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/bg/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/bn_BD/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/bn_IN/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ca/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ckb/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cs/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/eo/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/es/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/eu/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fr/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ga/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hi/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ja/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/kab/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ko/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nb_NO/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nl/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pl/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_BR/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ru/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sa/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/si/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sl/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sv/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/th/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_MO/
Translation: Tusky/Tusky
2024-05-03 19:42:14 +00: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