Commit Graph

4006 Commits

Author SHA1 Message Date
fin-w b05965923d Translated using Weblate (Welsh)
Currently translated at 100.0% (639 of 639 strings)

Co-authored-by: fin-w <puf@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-03-10 04:45:01 +00:00
Willow fbb22799dc
Machine translation of posts (#4307) 2024-03-09 16:12:18 +01:00
Ümit Solmaz 071ae0bed2 Translated using Weblate (Turkish)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-03-09 09:28:37 +00:00
Konrad Pozniak be8b7c3a31
improve MainActivity / LoginActivity transitions (#4301)
I overlooked those in https://github.com/tuskyapp/Tusky/pull/4224
2024-03-09 11:04:29 +01:00
Christophe Beyls 9901376d38
Move ExoPlayer initialization to a Dagger module and optimize its dependencies (#4296)
Currently, ExoPlayer is initialized explicitly in `ViewMediaFragment`
with all its dependencies, including many that are not useful for
viewing Mastodon media attachments.

This pull request moves most ExoPlayer initialization and configuration
to a new Dagger module, and instead a `Provider<ExoPlayer>` factory is
injected in the Fragment so it can create new instances when needed.

The following ExoPlayer components will be configured:

- **Renderers**: all of them (audio, video, metadata, subtitles) except
for the `CameraMotionRenderer`.
- **Extractors**: FLAC, Wav, Mp4, Ogg, Matroska/WebM and MP3 containers,
to provide the same support as Firefox or Chrome browsers. Other
container formats that are either image formats (already covered by
Glide), not web-friendly or reserved for live streaming are skipped.
- **MediaSource**: only progressive download (through OkHttp) is
provided. Live streaming support using protocols like RTSP, MPEG/Dash or
HLS is skipped, because Mastodon servers don't use these protocols to
download attachments.

The Mastodon documentation mentions the [supported media formats for
attachments](https://docs.joinmastodon.org/user/posting/#media) and this
covers them and even more. The docs also mentions that the video and
audio files are transcoded to MP4 and MP3 upon upload but that was not
the case in the past (for example WebM was used) and it could change
again in the future.

Specifying these components manually allows reducing the APK size by
about 200 KB thanks to R8 shrinking.

There are also a few extra code changes:
- Remove the code specific to API < 24 since the min SDK of the app is
now 24.
- Add support for pausing a video when unplugging headphones.
- Specify the audio attributes according to content type to help the
Android audio mixer.
2024-03-09 11:04:04 +01:00
Konrad Pozniak f09a5b00e0
fix boost/reply filters not working correctly in home timelines (#4308)
closes #4306
2024-03-06 13:21:29 +01:00
XoseM 0132b758af Translated using Weblate (Galician)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2024-03-06 11:31:48 +00:00
Hồ Nhất Duy c4bc15c04f Translated using Weblate (Vietnamese)
Currently translated at 100.0% (634 of 634 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-03-06 11:31:48 +00:00
Ümit Solmaz df75dd61c9 Translated using Weblate (Turkish)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-03-06 11:31:48 +00:00
Konrad Pozniak 7a05530359
put r8 rules for enums back in to fix crash in AccountListActivity (#4299)
Regression from #4291 // cc @cbeyls 

<details>
  <summary>Stacktrace</summary>
  
  ```
Process: com.keylesspalace.tusky, PID: 31230
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.keylesspalace.tusky/com.keylesspalace.tusky.components.accountlist.AccountListActivity}:
java.lang.RuntimeException: java.lang.NoSuchMethodException: h4.a.values
[]
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3635)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
at
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7839)
	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:1003)
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException:
h4.a.values []
	at java.lang.Enum.enumValues(Enum.java:270)
	at java.lang.Enum.access$000(Enum.java:61)
	at java.lang.Enum$1.create(Enum.java:277)
	at java.lang.Enum$1.create(Enum.java:275)
	at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
	at java.lang.Enum.getSharedConstants(Enum.java:289)
	at java.lang.Enum.valueOf(Enum.java:243)
	at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:1841)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1409)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:427)
	at android.os.Parcel.readSerializable(Parcel.java:3507)
	at android.os.Parcel.readValue(Parcel.java:3277)
	at android.os.Parcel.readArrayMapInternal(Parcel.java:3623)
at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
	at android.os.BaseBundle.unparcel(BaseBundle.java:236)
	at android.os.BaseBundle.getSerializable(BaseBundle.java:1268)
	at android.os.Bundle.getSerializable(Bundle.java:1104)
	at android.content.Intent.getSerializableExtra(Intent.java:8575)
at
com.keylesspalace.tusky.components.accountlist.AccountListActivity.onCreate(SourceFile:23)
	at android.app.Activity.performCreate(Activity.java:8051)
	at android.app.Activity.performCreate(Activity.java:8031)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792) 
at
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
at
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
at
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210) 
	at android.os.Handler.dispatchMessage(Handler.java:106) 
	at android.os.Looper.loopOnce(Looper.java:201) 
	at android.os.Looper.loop(Looper.java:288) 
	at android.app.ActivityThread.main(ActivityThread.java:7839) 
	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:1003) 
Caused by: java.lang.NoSuchMethodException: h4.a.values []
	at java.lang.Class.getMethod(Class.java:2103)
	at java.lang.Class.getDeclaredMethod(Class.java:2081)
	at java.lang.Enum.enumValues(Enum.java:267)
	at java.lang.Enum.access$000(Enum.java:61) 
	at java.lang.Enum$1.create(Enum.java:277) 
	at java.lang.Enum$1.create(Enum.java:275) 
	at libcore.util.BasicLruCache.get(BasicLruCache.java:63) 
	at java.lang.Enum.getSharedConstants(Enum.java:289) 
	at java.lang.Enum.valueOf(Enum.java:243) 
	at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:1841) 
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1409) 
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:427) 
	at android.os.Parcel.readSerializable(Parcel.java:3507) 
	at android.os.Parcel.readValue(Parcel.java:3277) 
	at android.os.Parcel.readArrayMapInternal(Parcel.java:3623) 
at
android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292) 
	at android.os.BaseBundle.unparcel(BaseBundle.java:236) 
	at android.os.BaseBundle.getSerializable(BaseBundle.java:1268) 
	at android.os.Bundle.getSerializable(Bundle.java:1104) 
	at android.content.Intent.getSerializableExtra(Intent.java:8575) 
at
com.keylesspalace.tusky.components.accountlist.AccountListActivity.onCreate(SourceFile:23) 
	at android.app.Activity.performCreate(Activity.java:8051) 
	at android.app.Activity.performCreate(Activity.java:8031) 
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329) 
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608) 
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792) 
at
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
at
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
at
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210) 
	at android.os.Handler.dispatchMessage(Handler.java:106) 
	at android.os.Looper.loopOnce(Looper.java:201) 
	at android.os.Looper.loop(Looper.java:288) 
	at android.app.ActivityThread.main(ActivityThread.java:7839) 
	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:1003) 
  ```
</details>

closes #4297
2024-03-04 06:54:09 +01:00
Sveinn í Felli 9084116305 Translated using Weblate (Icelandic)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
2024-03-01 06:32:34 +00:00
Luna Jernberg f083c463a0 Translated using Weblate (Swedish)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sv/
Translation: Tusky/Tusky
2024-03-01 06:32:34 +00:00
Ihor Hordiichuk b1ac7e587d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2024-03-01 06:32:34 +00:00
XoseM 4aa1980033 Translated using Weblate (Galician)
Currently translated at 99.6% (632 of 634 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2024-03-01 06:32:34 +00:00
fin-w 21e97faf78 Translated using Weblate (Welsh)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: fin-w <puf@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-03-01 06:32:34 +00:00
Christophe Beyls 722b75e5c2
Optimize Proguard rules (#4291)
Using saner defaults for R8 while reducing the app size even further.
- Add Kotlin compiler options to skip adding assertions in release
builds
- Remove `optimizations`, `optimizationpasses` and `dontpreverify` rules
that are ignored by R8
- Only keep runtime annotations by default. If other attributes are
needed by a specific library, these will already be provided by the
library rules (for example Retrofit or coroutines)
- Remove the obsolete rule allowing a View to reflectively call any
arbitrary public Activity method accepting a View as argument. This has
always been a bad practice and is not used in this project anyway
- Remove the rules related to enums. R8 already optimizes enums properly
out-of-the-box and keeping these rules may prevent some of these
optimizations
- Add support for the `@Keep` annotation. Even if it's not currently
used in the code base, it can be handy in the future
- Add a missing rule to prevent generic signature of `NetworkResult`
class from being removed in `MastodonApi` so Retrofit works
- Allow obfuscation and shrinking of `kotlin.coroutines.Continuation`,
matching the rule defined in the next release of Retrofit
- Remove the rule forcing the removal of `String.format()`. This method
is actually used in the code (and in third-party libraries) for other
things than logging so forcing its removal can do more harm than good.
2024-02-29 15:29:05 +01:00
Christophe Beyls 40fde54e0b
Replace RxJava3 code with coroutines (#4290)
This pull request removes the remaining RxJava code and replaces it with
coroutine-equivalent implementations.

- Remove all duplicate methods in `MastodonApi`:
- Methods returning a RxJava `Single` have been replaced by suspending
methods returning a `NetworkResult` in order to be consistent with the
new code.
- _sync_/_async_ method variants are replaced with the _async_ version
only (suspending method), and `runBlocking{}` is used to make the async
variant synchronous.
- Create a custom coroutine-based implementation of `Single` for usage
in Java code where launching a coroutine is not possible. This class can
be deleted after remaining Java code has been converted to Kotlin.
- `NotificationsFragment.java` can subscribe to `EventHub` events by
calling the new lifecycle-aware `EventHub.subscribe()` method. This
allows using the `SharedFlow` as single source of truth for all events.
- Rx Autodispose is replaced by `lifecycleScope.launch()` which will
automatically cancel the coroutine when the Fragment view/Activity is
destroyed.
- Background work is launched in the existing injectable
`externalScope`, since using `GlobalScope` is discouraged.
`externalScope` has been changed to be a `@Singleton` and to use the
main dispatcher by default.
- Transform `ShareShortcutHelper` to an injectable utility class so it
can use the application `Context` and `externalScope` as provided
dependencies to launch a background coroutine.
- Implement a custom Glide extension method
`RequestBuilder.submitAsync()` to do the same thing as
`RequestBuilder.submit().get()` in a non-blocking way. This way there is
no need to switch to a background dispatcher and block a background
thread, and cancellation is supported out-of-the-box.
- An utility method `Fragment.updateRelativeTimePeriodically()` has been
added to remove duplicate logic in `TimelineFragment` and
`NotificationsFragment`, and the logic is now implemented using a simple
coroutine instead of `Observable.interval()`. Note that the periodic
update now happens between onStart and onStop instead of between
onResume and onPause, since the Fragment is not interactive but is still
visible in the started state.
- Rewrite `BottomSheetActivityTest` using coroutines tests.
- Remove all RxJava library dependencies.
2024-02-29 15:28:48 +01:00
Konrad Pozniak 7448fd2416
change SendStatusService type to shortService (#4292)
This way the `FOREGROUND_SERVICE_REMOTE_MESSAGING` permission is not
needed and we should be able to publish on Google Play again. Drawback:
The service can get killed after a while (usually 3 mins) on Android 14.
I also tried using [user initiated data transfer
jobs](https://developer.android.com/about/versions/14/changes/user-initiated-data-transfers),
but that is not available on all api levels, and `WorkManager`, but that
is a huge refactoring and sending would probably work differently than
before.
2024-02-29 12:21:15 +01:00
Konrad Pozniak 6249b53718
Fix some warnings & recreate lint-baseline.xml (#4278) 2024-02-25 16:20:26 +01:00
Willow c666a6b534
Better screen transitions (#4285)
I mostly took Android 13 transitions and removed the sliding for the
"deeper"/background one because "extend" animations are not available
until Android 13.

Here are the original ones:
https://cs.android.com/android/platform/superproject/+/android-13.0.0_r8:frameworks/base/core/res/res/anim/;bpv=1

Initially I've made separate versions fro Android 13+ that are close to
the original but I think it's not worth it to keep both.



https://github.com/tuskyapp/Tusky/assets/3099142/616fc40c-f944-45b4-bf6f-167f62d30493
2024-02-25 16:20:15 +01:00
Christophe Beyls a19540f0e4
Simplify and reduce overhead of lazy view binding in Fragments (#4269)
This reduces complexity of view binding inflation in Fragments, and also
reduces overhead (no `KProperty` objects need to be generated by the
compiler) by implementing `Lazy` instead of `ReadOnlyProperty`.

For a full explanation, see this [detailed blog
post](https://medium.com/@bladecoder/viewlifecyclelazy-and-other-ways-to-avoid-view-memory-leaks-in-android-fragments-4aa982e6e579).
2024-02-23 20:10:33 +01:00
Konrad Pozniak 7dca2fed58
fix sending posts on Api 34 (#4274)
```
java.lang.RuntimeException: Unable to start service com.keylesspalace.tusky.service.SendStatusService@1eb9198 with Intent { cmp=com.keylesspalace.tusky.test/com.keylesspalace.tusky.service.SendStatusService (has extras) }: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{18608f7 22134:com.keylesspalace.tusky.test/u0a193} targetSDK=34
           at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4839)
           at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2289)
           at android.os.Handler.dispatchMessage(Handler.java:106)
           at android.os.Looper.loopOnce(Looper.java:205)
           at android.os.Looper.loop(Looper.java:294)
           at android.app.ActivityThread.main(ActivityThread.java:8177)
           at java.lang.reflect.Method.invoke(Native Method)
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
          Caused by: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{18608f7 22134:com.keylesspalace.tusky.test/u0a193} targetSDK=34
           at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
           at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
           at android.os.Parcel.readParcelableInternal(Parcel.java:4870)
           at android.os.Parcel.readParcelable(Parcel.java:4852)
           at android.os.Parcel.createExceptionOrNull(Parcel.java:3052)
           at android.os.Parcel.createException(Parcel.java:3041)
           at android.os.Parcel.readException(Parcel.java:3024)
           at android.os.Parcel.readException(Parcel.java:2966)
           at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6761)
           at android.app.Service.startForeground(Service.java:775)
           at com.keylesspalace.tusky.service.SendStatusService.onStartCommand(SendStatusService.kt:137)
           at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4821)
           at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0) 
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2289) 
           at android.os.Handler.dispatchMessage(Handler.java:106) 
           at android.os.Looper.loopOnce(Looper.java:205) 
           at android.os.Looper.loop(Looper.java:294) 
           at android.app.ActivityThread.main(ActivityThread.java:8177) 
           at java.lang.reflect.Method.invoke(Native Method) 
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) 
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) 
```
2024-02-23 16:50:33 +01:00
Weblate 0dec496ccb Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/
Translation: Tusky/Tusky
2024-02-23 13:22:59 +00:00
Zongle Wang 88c75c8d9b
Room 2.6.1 with Kotlin code generation (#4081)
https://developer.android.com/jetpack/androidx/releases/room#2.6.0
2024-02-23 12:21:31 +01:00
Konrad Pozniak b976fe5296
full sdk 34 support (#4224)
builds upon work from #4082 

Additionally fixes some deprecations and adds support for [predictive
back](https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture).
I also refactored how the activity transitions work because they are
closely related to predictive back. The awkward
`finishWithoutSlideOutAnimation` is gone, activities that have been
started with slide in will now automatically close with slide out.

To test predictive back you need an emulator or device with Sdk 34
(Android 14) and then enable it in the developer settings.

Predictive back requires the back action to be determined before it
actually occurs so the system can play the right predictive animation,
which made a few reorganisations necessary.

closes #4082 
closes #4005 
unlocks a bunch of dependency upgrades that require sdk 34

---------

Co-authored-by: Goooler <wangzongler@gmail.com>
2024-02-23 10:27:19 +01:00
Konrad Pozniak fa8bede7d6
fix compose notification action not recreating MainActivity (#4249)
closes #4247
2024-02-23 10:27:07 +01:00
Konrad Pozniak 7d3aafdd65
fix quick replies from notifications (#4250)
While working on #4249 I noticed that quick replies also don't work as
expected. The notification just stays in the sending state forever.
There are actually 2 problems:
- Notifications are sent in `NotificationFetcher` with the id of the
Mastodon notification as tag and the current account id as id. The wrong
notification id was forwarded to `SendStatusBroadcastReceiver` so it
never had a chance of updating the notification.
- Notifications containing an active remote input can't be cancelled
(they just stop their animation when doing so). So instead I update the
notification with info that the reply is being sent and have it dismiss
automatically.

I also tried replacing the original notification with the "sending"
notification of `SendStatusService`, but that doesn't work because
`Service.startForeground` doesn't have a tag parameter, only an id.

---------

Co-authored-by: Willow <charlag@tuta.io>
2024-02-23 10:26:46 +01:00
Willow 22ec78c75a
Improve detailed status looks (#4260)
#4205 did change how the counters for the detailed posts behave and for
a good reason I believe.

However I find the changed order very confusing and not aesthetically
pleasing.

I have tried a few options, including reserving space for it but it was
confusing (when counters are not displayed there would be a danging
separator or if we show separator together with it it would be confusing
as well).

I propose we simply show the counters independent on the counts. I know
we try to de-emphasize the counters but I believe this is fine to do in
detailed view.

One disadvantage is that we need translators to update the translations.

Additionally I've done two spacing changes: I removed a separator
between the counters and the buttons, removed padding around the
counters and increased the space between the counters and the buttons
instead. I believe it's better to use space than separators. This also
makes the space above/below the media/counters separator balanced.

In the second commit I've also made the metadata/counters separators
thinner, I think it looks better.

here's the combined version:


![proposal_final](https://github.com/tuskyapp/Tusky/assets/3099142/ea9d4c0c-fe6a-4f2e-8427-673b2a833e6b)
2024-02-23 10:25:05 +01:00
Salif Mehmed 4e43feb9dc Translated using Weblate (Bulgarian)
Currently translated at 86.4% (548 of 634 strings)

Co-authored-by: Salif Mehmed <mail@salif.eu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/bg/
Translation: Tusky/Tusky
2024-02-21 04:45:01 +00:00
Rhoslyn Prys 2c13805d84 Translated using Weblate (Welsh)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Rhoslyn Prys <post@meddal.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-02-21 04:45:01 +00:00
Levi Bard 6994693496
Move the statistics bar in the detailed view below the button bar (#4205)
Rationale: In the current layout, when performing multiple interactions
(e.g. fav+boost, fav+reply) on a post that hasn't been interacted with
before, the statistics bar appears and pushes the buttons down, so the
second tap goes to the statistics bar instead
2024-02-20 10:17:13 +01:00
Konrad Pozniak 7173d5e1e7
make badge for new direct messages blue (#4257)
This makes the dot badge that we show on the direct messages tab when
there are unread messages blue instead of red. I prefer it that way
because its more subtle and doesn't look like there is some kind of
error.

before / after:

<img
src="https://github.com/tuskyapp/Tusky/assets/10157047/f4b241a5-0fa4-4134-9790-18f74caa2dae"
width="240"/> <img
src="https://github.com/tuskyapp/Tusky/assets/10157047/56788d5c-f19c-4fa5-b83e-e824aed995f4"
width="240"/>
2024-02-19 09:22:14 +01:00
Konrad Pozniak 1cd8b497f7
set greenDebug as default flavor (#4251)
I had it happen multiple times recently that I was testing green Tusky
but Android Studio actually put blue Tusky on my device and I wasted a
lot of time until I found out 😣
This change should tell it that greenDebug is the preferred flavor for
developing.
2024-02-17 15:15:19 +01:00
Konrad Pozniak 17e99bbc2e
Revert "Migrate to Hilt KSP compiler (#4136)" (#4246)
This reverts commit 6494247301.

Seems like dagger/ksp is still a bit buggy, I'm getting one of these
errors every other build, so lets revert this for now.

https://github.com/google/dagger/issues/4181
https://github.com/google/ksp/issues/1196
2024-02-10 10:42:31 +01:00
Ihor Hordiichuk e2c2db1d31 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2024-02-04 04:45:01 +00:00
Hồ Nhất Duy dbe82fe1b0 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (634 of 634 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-02-04 04:45:01 +00:00
Ümit Solmaz b826ca15a9 Translated using Weblate (Turkish)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-02-04 04:45:01 +00:00
fin-w 61de55efa7 Translated using Weblate (Welsh)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: fin-w <puf@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-02-04 04:45:00 +00:00
XoseM c9d29fa92f Translated using Weblate (Galician)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2024-02-04 04:45:00 +00:00
Konrad Pozniak 7fef19efc6
Revert "make timestamp abbreviations plurals (#4202)" (#4230)
This reverts commit 5174c00558.

closes #4145
2024-01-28 19:48:35 +01:00
ButterflyOfFire 5ae6611072 Translated using Weblate (French)
Currently translated at 93.5% (592 of 633 strings)

Translated using Weblate (Arabic)

Currently translated at 91.4% (579 of 633 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ar/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fr/
Translation: Tusky/Tusky
2024-01-28 17:35:57 +00:00
Konrad Pozniak d66866648e
improve null safety of instance info (#4226)
according to crash logs there are seem to be some instances that don't
always return the expected json, so lets be extra safe here

```
Exception java.lang.NullPointerException:
  at com.keylesspalace.tusky.components.instanceinfo.InstanceInfoRepository$getInstanceInfo$2.invokeSuspend (InstanceInfoRepository.kt:67)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:108)
  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run (LimitedDispatcher.java:115)
  at kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:103)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java:584)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:793)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:697)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:684)
```
2024-01-28 19:08:44 +01:00
Konrad Pozniak 0c2b8b114b
make sure link preview card is not shown when cw is collapsed (#4218)
The sensitive flag indicates sensitive media, but we want to check if
there is a contentwarning on the post. I think statuses that have a
contentwarning but no sensitive flag are rare so we never noticed this
bug.

closes #4201
2024-01-28 19:07:51 +01:00
Konrad Pozniak 0b9f61c100
bring back the notification filter preference (#4225)
It was probably forgotten when we restored the old notifications
behavior.
closes #4222
2024-01-28 19:07:29 +01:00
Konrad Pozniak 750e255029
fix check that ensures only one bookmark tab is added (#4217)
closes #4214
2024-01-28 19:07:17 +01:00
XoseM 88dbc8de12 Translated using Weblate (Galician)
Currently translated at 100.0% (633 of 633 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2024-01-17 04:45:01 +00:00
Sveinn í Felli 5b04a0e8e1 Translated using Weblate (Icelandic)
Currently translated at 100.0% (633 of 633 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
2024-01-17 04:45:01 +00:00
Hồ Nhất Duy 9005e6525c Translated using Weblate (Vietnamese)
Currently translated at 100.0% (633 of 633 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-01-17 04:45:01 +00:00
Bruno Miguel 6f22072d0e Translated using Weblate (Portuguese (Portugal))
Currently translated at 100.0% (633 of 633 strings)

Co-authored-by: Bruno Miguel <brunoalexandremiguel@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2024-01-17 04:45:01 +00:00
João Alves 8df7a58679 Translated using Weblate (Portuguese (Portugal))
Currently translated at 100.0% (633 of 633 strings)

Co-authored-by: João Alves <joao.2003.couto+weblate@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2024-01-17 04:45:01 +00:00
Bruno Miguel a25f9f5823 Translated using Weblate (Portuguese (Portugal))
Currently translated at 100.0% (633 of 633 strings)

Co-authored-by: Bruno Miguel <brunoalexandremiguel@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2024-01-17 04:45:01 +00:00
Newidyn a489be35b1 Translated using Weblate (Welsh)
Currently translated at 98.7% (625 of 633 strings)

Co-authored-by: Newidyn <grugallt@protonmail.ch>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-01-17 04:45:00 +00:00
fin-w c536b11072 Translated using Weblate (Welsh)
Currently translated at 98.7% (625 of 633 strings)

Co-authored-by: fin-w <puf@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-01-17 04:45:00 +00:00
Ihor Hordiichuk 111b301246 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (633 of 633 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2024-01-17 04:45:00 +00:00
Konrad Pozniak 5174c00558
make timestamp abbreviations plurals (#4202)
some languages require it

closes #4145

Changing all the strings was easy with the Regex replace feature
https://www.jetbrains.com/help/idea/tutorial-finding-and-replacing-text-using-regular-expressions.html
2024-01-09 20:35:40 +01:00
Maximilian Ertl 27a610bd48
feat: explicitly enable the share-button in Chrome Custom Tabs (#4223)
Chrome defaults to showing it anyways, but Firefox doesn't. By enabling
this feature, users across both browsers will now have the same
experience.

closes tuskyapp/Tusky/issues/4137
2024-01-09 20:08:41 +01:00
Zongle Wang c9f8b043c5
Polish Chinese translations (#4221)
- Insert blanks between Chinese chars with Ascii chars.
- Fix the typo of `账户`.
- Add full_description and short_description for Traditional Chinese.
2024-01-09 20:07:49 +01:00
Ümit Solmaz a08ef5d68f Translated using Weblate (Turkish)
Currently translated at 100.0% (633 of 633 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (633 of 633 strings)

Translated using Weblate (German)

Currently translated at 100.0% (633 of 633 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ru/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2024-01-09 04:45:01 +00:00
Hồ Nhất Duy 4efc54246f Translated using Weblate (Vietnamese)
Currently translated at 100.0% (633 of 633 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-01-09 04:45:01 +00:00
Konrad Pozniak afbc183c02
add missing room schema file (#4211) 2024-01-07 10:45:30 +01:00
Konrad Pozniak 5192fb08a5
upgrade ktlint plugin to 12.0.3 (#4169)
There are some new rules, I think they mostly make sense, except for the
max line length which I had to disable because we are over it in a lot
of places.

---------

Co-authored-by: Goooler <wangzongler@gmail.com>
2024-01-04 17:00:55 +01:00
Sveinn í Felli 99e78eab78 Translated using Weblate (Icelandic)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
2024-01-04 07:37:01 +00:00
Rhoslyn Prys 305953358b Translated using Weblate (Welsh)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Rhoslyn Prys <post@meddal.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-01-04 07:37:01 +00:00
Eric 260f18ffce Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Eric <ekhfcxwuvxqfdb@hldrive.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2024-01-04 07:37:01 +00:00
Ricardo 3193453775 Translated using Weblate (Portuguese (Portugal))
Currently translated at 96.3% (611 of 634 strings)

Co-authored-by: Ricardo <ricardojmv0@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2024-01-04 07:37:01 +00:00
Danial Behzadi d822eb72c4 Translated using Weblate (Persian)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2024-01-04 07:37:01 +00:00
Quentí 6c80db6e03 Translated using Weblate (Occitan)
Currently translated at 98.7% (626 of 634 strings)

Co-authored-by: Quentí <quentinantonin@free.fr>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/oc/
Translation: Tusky/Tusky
2024-01-04 07:37:01 +00:00
fin-w f9817633bd Translated using Weblate (Welsh)
Currently translated at 100.0% (633 of 633 strings)

Translated using Weblate (Welsh)

Currently translated at 100.0% (634 of 634 strings)

Translated using Weblate (Welsh)

Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: fin-w <puf@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2024-01-04 07:37:01 +00:00
mcclure 70f8e8ba93
Implement new policy: The database version number is always even (#4128)
Posted this as issue #3999 before. The reasoning is personal experiments
and forks may add database fields and must bump the database number to
do so, but this causes massive merge difficulties when Tusky then
inevitably itself bumps the number. To alleviate this, Tusky official
should use only even database numbers, so odd versions are available for
third party scribbling.

There was little discussion positive or negative in #3999 (one proposal
we switch to a date-based number system, which would work but also could
be unnecessarily complicated). With PR #4115 we now have to make a
decision because that's the first post-proposal PR to bump the database
number odd. So, since I see no outright objections, I'd like to
implement this.

@connyduck suggested the best way to implement the proposal would be to
add a comment to the version number's home in AppDatabase.java.

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
2024-01-03 22:21:18 +01:00
Konrad Pozniak 1f698e0732
show post language in metadata (#4127)
closes https://github.com/tuskyapp/Tusky/issues/3096

<img
src="https://github.com/tuskyapp/Tusky/assets/10157047/417c55a9-168b-4ada-9636-de6314698def"
width="320">
2024-01-03 21:17:28 +01:00
UlrichKu 0698333665
3488 improve profile list (#3507)
Fixes #3488 

Working with lists from a profile page and in the normal "lists view"
from the drawer now use the same fragment view code.

(also) RFC regarding joining different list lists


![grafik](https://user-images.githubusercontent.com/1618905/229463168-397bd943-82d8-4e05-a8bf-9fcf22f6c1f9.png)
2024-01-03 21:17:03 +01:00
Zongle Wang 6494247301
Migrate to Hilt KSP compiler (#4136)
https://github.com/google/dagger/releases/tag/dagger-2.49

Closes #4012.
2024-01-03 21:16:05 +01:00
sanao e8e7bad110
feat: Change name of Preferences > Filters > Tabs and move them to Account Preferences(#3536) (#4115)
# Overview
In the previous code, when you open preferences, there is a section
headed "Filters" with a section called "Tabs"

This is confusing.

# Changes
- Change the section title from "Filters" to "Per-timeline preferences."
- Change the current "Tabs" section to "Home timeline" since it is only
for home timelines

# Screenshots
account preference screen | detail screen
:--: | :--:
|<image
src="https://github.com/tuskyapp/Tusky/assets/62137820/12694f24-b7e3-4ba3-90f5-53740e9c4269"
width="250" />|<image
src="https://github.com/tuskyapp/Tusky/assets/62137820/796e9ac1-76d6-43ef-a087-a1cd2d899ef8"
width="250" />

# Note
- Maybe string resources should have a new property? (for translation)

# Related link
 Fixes #3536

---------

Co-authored-by: mcc <andi.m.mcclure@gmail.com>
2024-01-03 21:14:13 +01:00
charlag 3bea267407
Release 117 (24.1) 2023-12-27 19:25:49 +01:00
fin-w 78c7a105a6 Translated using Weblate (Welsh)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: fin-w <puf@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-12-27 19:24:31 +01:00
Rogljič b87a8d893b Translated using Weblate (Slovenian)
Currently translated at 58.6% (372 of 634 strings)

Co-authored-by: Rogljič <zala.roguljic@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sl/
Translation: Tusky/Tusky
2023-12-24 08:55:22 +00:00
Danial Behzadi bc8282496d Translated using Weblate (Persian)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-12-24 08:55:22 +00:00
ButterflyOfFire 0c4cc31c2d Translated using Weblate (Turkish)
Currently translated at 100.0% (634 of 634 strings)

Translated using Weblate (French)

Currently translated at 95.1% (603 of 634 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fr/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2023-12-24 08:55:22 +00:00
XoseM db3d1ec13d Translated using Weblate (Galician)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2023-12-24 08:55:22 +00:00
Konrad Pozniak 004659a54d
fix Glide IllegalArgumentException in DrawerImageLoader (#4189)
Turns out that the crash I thought will not occur with #4153 did occur
again. 😒
But this time I managed to reproduce it (faking a slow network for that
one request only and then quickly switching activities to get it
destroyed) so I'm sure it is fixed, and I did a check for possible side
effects but it seems Glide is clever enough to cancel all requests by
itself.

<details>
<summary>stacktrace</summary>

```
Exception java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity
  at com.bumptech.glide.manager.RequestManagerRetriever.assertNotDestroyed (RequestManagerRetriever.java:236)
  at com.bumptech.glide.manager.RequestManagerRetriever.get (RequestManagerRetriever.java:110)
  at com.bumptech.glide.manager.RequestManagerRetriever.get (RequestManagerRetriever.java:176)
  at com.bumptech.glide.Glide.with (Glide.java:634)
  at com.keylesspalace.tusky.MainActivity$setupDrawer$2.cancel (MainActivity.kt:573)
  at com.mikepenz.materialdrawer.util.DrawerImageLoader.cancelImage (DrawerImageLoader.java:56)
  at com.mikepenz.materialdrawer.model.BaseDescribeableDrawerItem.unbindView (BaseDescribeableDrawerItem.kt:95)
  at com.mikepenz.materialdrawer.model.BaseDescribeableDrawerItem.unbindView (BaseDescribeableDrawerItem.kt:20)
  at com.mikepenz.fastadapter.listeners.OnBindViewHolderListenerImpl.unBindViewHolder (OnBindViewHolderListenerImpl.java:36)
  at com.mikepenz.fastadapter.FastAdapter.onViewRecycled (FastAdapter.kt:410)
  at androidx.recyclerview.widget.RecyclerView$Recycler.dispatchViewRecycled (RecyclerView.java:7346)
  at androidx.recyclerview.widget.RecyclerView$Recycler.addViewHolderToRecycledViewPool (RecyclerView.java:7108)
  at androidx.recyclerview.widget.RecyclerView$Recycler.recycleViewHolderInternal (RecyclerView.java:7059)
  at androidx.recyclerview.widget.RecyclerView.removeAnimatingView (RecyclerView.java:1556)
  at androidx.recyclerview.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished (RecyclerView.java:13564)
  at androidx.recyclerview.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished (RecyclerView.java:14066)
  at androidx.recyclerview.widget.SimpleItemAnimator.dispatchChangeFinished (SimpleItemAnimator.java:328)
  at androidx.recyclerview.widget.DefaultItemAnimator.endChangeAnimationIfNecessary (DefaultItemAnimator.java:437)
  at androidx.recyclerview.widget.DefaultItemAnimator.endChangeAnimationIfNecessary (DefaultItemAnimator.java:418)
  at androidx.recyclerview.widget.DefaultItemAnimator.endAnimations (DefaultItemAnimator.java:588)
  at androidx.recyclerview.widget.RecyclerView.onDetachedFromWindow (RecyclerView.java:3383)
  at android.view.View.dispatchDetachedFromWindow (View.java:20898)
  at android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:3956)
  at android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:3948)
  at android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:3948)
  at android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:3948)
  at android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:3948)
  at android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:3948)
  at android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:3948)
  at android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:3948)
  at android.view.ViewRootImpl.dispatchDetachedFromWindow (ViewRootImpl.java:5114)
  at android.view.ViewRootImpl.doDie (ViewRootImpl.java:8309)
  at android.view.ViewRootImpl.die (ViewRootImpl.java:8286)
  at android.view.WindowManagerGlobal.removeViewLocked (WindowManagerGlobal.java:538)
  at android.view.WindowManagerGlobal.removeView (WindowManagerGlobal.java:479)
  at android.view.WindowManagerImpl.removeViewImmediate (WindowManagerImpl.java:162)
  at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:5564)
  at android.app.ActivityThread.handleRelaunchActivityInner (ActivityThread.java:5842)
  at android.app.ActivityThread.handleRelaunchActivity (ActivityThread.java:5758)
  at android.app.servertransaction.ActivityRelaunchItem.execute (ActivityRelaunchItem.java:71)
  at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2293)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:329)
  at android.app.ActivityThread.main (ActivityThread.java:8058)
  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:1026)
```

</details>
2023-12-24 09:19:08 +01:00
Max Malekzadeh 5cce62bc6a
Add copyright notices in source file headers (Fixes issue #4188) (#4190) 2023-12-24 09:18:09 +01:00
Konrad Pozniak 0f3f2238e2
fix ClassCastException in ClickableSpanTextView (#4185)
<details>
  <summary>Stacktrace</summary>
  
  ```
java.lang.ClassCastException: java.lang.String cannot be cast to
android.text.Spannable
at
com.keylesspalace.tusky.view.ClickableSpanTextView.dispatchTouchEvent(ClickableSpanTextView.kt:208)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
				at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
at
com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
at
com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1829)
				at android.app.Activity.dispatchTouchEvent(Activity.java:3307)
at
androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70)
at
com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
				at android.view.View.dispatchPointerEvent(View.java:12015)
at
android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4795)
at
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4609)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4166)
at
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4293)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4174)
at
android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4350)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4166)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4174)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6661)
  ```
  
</details>

Could not reproduce with a regular build because I couldn't find the
place where we set a string into a ClickableSpanTextView, so I created
that scenario manually. It crashed instantly when trying to select text,
and with this fix it behaved as expected.
2023-12-23 15:23:16 +01:00
Konrad Pozniak 9781e43441
fix ANR caused by direct message badge (#4182)
Saw an ANR (app not responding) error being reported in the Play console
and then found this. Sorry but `runBlocking` in production code is an
absolute no go.
2023-12-21 19:02:28 +01:00
Conny Duck d8c436c268 fix broken lint-baseline.xml 2023-12-16 19:56:40 +01:00
Conny Duck dece567eb5 Release 116 (24.1) 2023-12-16 19:15:32 +01:00
Konrad Pozniak cce811e0a5
fix icon alignment in help text of empty timelines (#4179)
@Lakoja do you remember why you added that version check? Removing it
fixes the bug.

Before / after
<img
src="https://github.com/tuskyapp/Tusky/assets/10157047/b2c2f79e-7f30-47fb-89ef-b5e4c31b0d0e"
width="200"/> <img
src="https://github.com/tuskyapp/Tusky/assets/10157047/3bb746f8-97e7-4d60-a67e-175e02a6d929"
width="200"/>

closes #4175
2023-12-16 15:26:22 +01:00
Vladyslav Stepanov 7a4e09b2b7 Translated using Weblate (Russian)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Vladyslav Stepanov <mittwerk@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ru/
Translation: Tusky/Tusky
2023-12-16 07:14:18 +00:00
Chaman Vétéran f3a6b7c8f6 Translated using Weblate (French)
Currently translated at 93.2% (591 of 634 strings)

Co-authored-by: Chaman Vétéran <nathm.va@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fr/
Translation: Tusky/Tusky
2023-12-15 06:12:14 +00:00
Ümit Solmaz 2293809986 Translated using Weblate (Turkish)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2023-12-15 06:12:14 +00:00
Vladyslav Stepanov 86753857ea Translated using Weblate (Russian)
Currently translated at 100.0% (634 of 634 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Vladyslav Stepanov <mittwerk@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ru/
Translation: Tusky/Tusky
2023-12-15 06:12:14 +00:00
Konrad Pozniak 6a98427fa5
fix crash when opening profile image (#4172)
```
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.keylesspalace.tusky.test/com.keylesspalace.tusky.ViewMediaActivity}: java.lang.NullPointerException
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
	at android.app.ActivityThread.-wrap11(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6494)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.NullPointerException
	at com.keylesspalace.tusky.ViewMediaActivity.adjustScreenWakefulness(ViewMediaActivity.kt:351)
	at com.keylesspalace.tusky.ViewMediaActivity.onCreate(ViewMediaActivity.kt:161)
	at android.app.Activity.performCreate(Activity.java:7009)
	at android.app.Activity.performCreate(Activity.java:7000)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
	at android.app.ActivityThread.-wrap11(Unknown Source:0) 
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
	at android.os.Handler.dispatchMessage(Handler.java:106) 
	at android.os.Looper.loop(Looper.java:164) 
	at android.app.ActivityThread.main(ActivityThread.java:6494) 
	at java.lang.reflect.Method.invoke(Native Method) 
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
```
2023-12-15 07:41:38 +01:00
Konrad Pozniak 331b13621e
Prevent device from dimming or sleeping screen while video/audio playing (but really) (#4168)
For reasons not totally clear to me, Github marked #4160 as "merged" and
will not let me reopen it.

I believe this should be included for 24.1 because it fixes a 24.0
regression in the media player.

I have tested this newest commit in a number of ways, and in my testing
I find (1) when viewing an image, it sleeps after about a minute (2)
when viewing video, it stays awake indefinitely (3) this is true whether
the image/video was opened directly, or reached by swiping from another
attachment. I have not tested swiping to/from audio but I am confident
it will work the same.
2023-12-13 19:23:11 +01:00
Konrad Pozniak 0c900842ec
fix text selection crash on older Androids (#4166)
I hate these workarounds for Android bugs, I'm always afraid the will
introduce other problems. I tested this on multiple Android versions, it
definitely fixes the problem and otherwise seems fine though.

closes #4164
2023-12-13 19:22:54 +01:00
mcc 877e7c6ec1 Adjust ViewMediaActivity FLAG_KEEP_SCREEN_ON logic to support swipe gestures 2023-12-12 18:01:18 -05:00
Sveinn í Felli c1e704073e Translated using Weblate (Icelandic)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
2023-12-12 04:45:01 +00:00
Ricardo 3a602eb971 Translated using Weblate (Portuguese (Portugal))
Currently translated at 96.3% (611 of 634 strings)

Co-authored-by: Ricardo <ricardojmv0@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2023-12-12 04:45:01 +00:00
Salif Mehmed de85c3bbf3 Translated using Weblate (Bulgarian)
Currently translated at 86.5% (549 of 634 strings)

Co-authored-by: Salif Mehmed <mail@salif.eu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/bg/
Translation: Tusky/Tusky
2023-12-12 04:45:01 +00:00
fin-w e7f50b6adb Translated using Weblate (Welsh)
Currently translated at 100.0% (634 of 634 strings)

Co-authored-by: fin-w <puf@users.noreply.weblate.tusky.app>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-12-12 04:45:01 +00:00
João Alves be64ae288b Translated using Weblate (Portuguese (Portugal))
Currently translated at 87.6% (556 of 634 strings)

Co-authored-by: João Alves <joao.2003.couto+weblate@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2023-12-12 04:45:01 +00:00
André Ferreira 244267225d Translated using Weblate (Portuguese (Portugal))
Currently translated at 87.6% (556 of 634 strings)

Co-authored-by: André Ferreira <andre@bravoferreira.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_PT/
Translation: Tusky/Tusky
2023-12-12 04:45:01 +00:00