Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to turn off swipe navigation between pages #38

Merged
merged 4 commits into from
Nov 19, 2021

Conversation

shambu2k
Copy link
Contributor

A simple fix for issue #36. As mentioned, I have added an option to toggle the swipe to go back feature in the settings bottom sheet.
As of now, I have accessed the persistence provider in the app.dart file and passed the bool useGestureNavigation variable to the theme builders. If false, pageTransitionsTheme is set to null which turns off the Swipeable page transition.

@Mosc
Copy link
Owner

Mosc commented Nov 18, 2021

I had envisioned this as a setting that disables all gestures, including swipes on item tiles (stories, comments, etc.) to fix #32 at the same time. Do you think that makes sense?

@Mosc
Copy link
Owner

Mosc commented Nov 18, 2021

Thanks for the contribution!

@shambu2k
Copy link
Contributor Author

I had envisioned this as a setting that disables all gestures, including swipes on item tiles (stories, comments, etc.) to fix #32 at the same time. Do you think that makes sense?

Hmm yeah, makes sense. I only thought of SwipeablePageTransition as I never had issues with upvote or reply gestures. Will try to implement for other gestures.

@shambu2k
Copy link
Contributor Author

Now this fixes #32 too. Included option to toggle all gestures within the app in the settings bottom sheet.

Copy link
Owner

@Mosc Mosc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job on the implementation overall, just some minor details I'd like to see changed to fit my currently preferred style.

lib/app.dart Outdated Show resolved Hide resolved
lib/l10n/app_nl.arb Outdated Show resolved Hide resolved
lib/widgets/items/item_tile_data.dart Show resolved Hide resolved
pubspec.lock Outdated Show resolved Hide resolved
lib/widgets/common/slidable.dart Outdated Show resolved Hide resolved
lib/app_theme.dart Outdated Show resolved Hide resolved
lib/repositories/storage_repository.dart Outdated Show resolved Hide resolved
@Mosc
Copy link
Owner

Mosc commented Nov 19, 2021

The CI build has failed on a few formatting issues. If your IDE doesn't automatically format the code, consider running flutter format ..

@shambu2k shambu2k requested a review from Mosc November 19, 2021 07:44
Copy link
Owner

@Mosc Mosc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants