thunder-app / thunder

Thunder - An open-source cross-platform Lemmy client for iOS and Android built with Flutter
https://thunderapp.dev
GNU Affero General Public License v3.0
712 stars 62 forks source link

Add an option to disable Swipe Gesture to go back #1340

Open Bingo90 opened 2 weeks ago

Bingo90 commented 2 weeks ago

Is Your Feature Request Related to a Problem?

Thunder's Swipe Gesture interferes with Android's system-wide back gesture, making it feel odd to go back. There currently doesn't seem to be a way to disable this.

Feature Description

Add a toggle to disable the gestures. They're not needed when using Android's gesture navigation.

Alternative Solutions

No response

Additional Context

No response

micahmo commented 2 weeks ago

Hey @Bingo90, thanks for the issue! Just to clarify, do you mean the ability to go back by swiping from anywhere left-to-right on the screen (as opposed to just the edge)?

If so, you're right that there isn't a way to disable that gesture specifically, although you can essentially "override" it by having a swipe gesture enabled for posts and comments. When those are enabled, swiping from left-to-right on the screen activates actions for posts/comments and does not swipe the page back.

Of course, if you don't want any of the action gestures enabled either, then we might have a case for adding a setting to completely disable the full-page swipe.

P.S. Not to discredit your experience at all, but I have never really experienced issues with the Android gesture conflicting with the full-page swipe. If I swipe from the edge, the Android gesture takes precedence. If I swipe from the middle, the app will handle the navigation. If there's something I'm missing, a video demonstrating the issue would go a long way to helping us understand!

Bingo90 commented 2 weeks ago

The left to right back gesture, yeah. I noticed it mostly in the settings screen, here's a video: https://github.com/thunder-app/thunder/assets/28258958/d56142ae-0f62-4016-b479-f56a5b83e415

micahmo commented 2 weeks ago

Hey @Bingo90, apologies but apparently this setting already exists and it totally slipped my mind. Check out Settings > Gestures > Fullscreen Swipe Gestures > disable. If that works for you, we can close this issue!

Bingo90 commented 2 weeks ago

Hey @Bingo90, apologies but apparently this setting already exists and it totally slipped my mind. Check out Settings > Gestures > Fullscreen Swipe Gestures > disable. If that works for you, we can close this issue!

I already had this disabled - I guess this doesn't apply to the settings pages?

micahmo commented 2 weeks ago

I guess this doesn't apply to the settings pages?

Ah, maybe not. That could be a miss on our part. We'll keep this issue open to track that!

hjiangsu commented 2 weeks ago

Just chiming in on this - I believe that setting only disables the full-screen swipe gesture, but keeps the edge swipe to go back gesture which is why it's not working.

Maybe what we can do here is extend it so that the setting completely disables edge swipe to go back as well. This should only be for Android, because iOS's system navigation uses the edge swipe to go back!

hjiangsu commented 2 weeks ago

I'll take this one!

hjiangsu commented 1 week ago

@Bingo90 I've merged in a PR which might resolve this issue. It's a bit tricky because the Settings page uses slightly different logic than the Feed/Post pages (so the left swipe to go back isn't the same).

We'll see if this fix also fixes the issues you were encountering with the Settings page. If it doesn't we'll try to see if we can reproduce it on our end. This fix will land in the next nightly so I'll let you know when that's released!

Bingo90 commented 5 days ago

I installed v0.4.0-2, it's still happening in settings.

hjiangsu commented 5 days ago

Thats unfortunate - this might be a harder issue to solve if this is the case. For devs:

@Bingo90 Could you provide some more details on your device/Android version? This might help us narrow down the scope to see if it's affecting specific devices or not.

@micahmo Are you able to reproduce this issue on your end (specific to the Settings issue)

Bingo90 commented 5 days ago

Thats unfortunate - this might be a harder issue to solve if this is the case. For devs:

* We currently use `go_router` for the navigations within the Settings page. `go_router` should be respecting the OS level navigation gestures (generally iOS uses swipe to go back, and Android uses the system swipe gesture)

@Bingo90 Could you provide some more details on your device/Android version? This might help us narrow down the scope to see if it's affecting specific devices or not.

@micahmo Are you able to reproduce this issue on your end (specific to the Settings issue)

Android 14, One UI 6.1. Galaxy S23+ This honestly isn't that important of an issue, considering it's just settings, but I guess it'd still be nice to fix ^^

micahmo commented 5 days ago

@micahmo Are you able to reproduce this issue on your end (specific to the Settings issue)

No I haven't been able to. 😞 I can't imagine what could be allowing the settings page to swipe back.

Bingo90 commented 5 days ago

Something I just figured out: When using gesture navigation on Android, swiping back didn't go back every time (maybe it interfered with the system gestures?) But with button navigation, swiping seems to work every time.