Commit Graph

3897 Commits

Author SHA1 Message Date
Conny Duck a49fbebc34 upgrade robolectric to 4.11.1 2024-01-05 20:42:48 +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
Ricardo 8741baefe4 Translated using Weblate (Portuguese (Portugal))
Currently translated at 87.6% (556 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
André Ferreira 17db97302c Translated using Weblate (Portuguese (Portugal))
Currently translated at 84.7% (537 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:00 +00:00
Ricardo db8be6ca08 Translated using Weblate (Portuguese (Portugal))
Currently translated at 84.7% (537 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:00 +00:00
André Ferreira 3769c9d43a Translated using Weblate (Portuguese (Portugal))
Currently translated at 82.0% (520 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:00 +00:00
Ricardo 3eeea0f442 Translated using Weblate (Portuguese (Portugal))
Currently translated at 82.0% (520 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:00 +00:00
mcc b9a593d6b0 ktLint fix 2023-12-10 18:13:46 -05:00
mcc 90f35ed009 Media3/exoplayer introduced a regression where the device can sleep while video/audio are playing. Patch restores v23 behavior 2023-12-10 13:56:02 -05:00
Konrad Pozniak 75c42cb5c1
prevent MainActivity from leaking through the DrawerImageLoader singleton (#4153)
Another fix for a memory leak. This one is not as big as #4150, but
still worth fixing for memory constrained devices imo.
The `DrawerImageLoader` implementation (a global singleton) references a
member of the `MainActivity`, causing the whole activity to leak.

This weird construct was introduced in #1989 to fix a crash, but I think
since we migrated to coroutines it is no longer necessary because all
calls get correctly cancelled. I tried reproducing the crash but could
not, so I'm pretty sure it is fine. I would appreciate it if someone
else could try it as well though.

(The crash could be reproduced on slow internet, when
`onFetchUserInfoSuccess` was called while the activity was being
destroyed, causing Glide to crash the app because it can't use destroyed
activities. `onFetchUserInfoSuccess` is now no longer called in this
case because it is inside a `lifecycleScope.launch` block.)
2023-12-10 09:44:53 +01:00
Konrad Pozniak ee3760fcc9
correctly count emojis when composing a post (#4152)
Thx to @evant for the help 

closes #4140
2023-12-10 07:38:25 +01:00