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 confirmation on exit #998

Merged
merged 7 commits into from
Jul 11, 2023
Merged

Add confirmation on exit #998

merged 7 commits into from
Jul 11, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jul 8, 2023

Adds a confirmation when trying to exit the app, to prevent accidental exits. I read somewhere that someone wanted this. Can't find the issue back though.

studio64_dsk4RgROYw.mp4

@twizmwazin
Copy link
Contributor

Instead of using toasts, could we use a dialog? Other apps with a similar feature will pop up a "are you sure you want to exit?" dialog, usually with a "don't ask me again" checkbox option, and an exit and cancel button.

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 8, 2023

I just copied the behaviour of what Boost did.
I would prefer a toast much over a dialog. I don't want a intrusive dialog each time I am trying to exit the app.
Adding a option in settings is possible but does add some complexity.

YF7NCY92p4.mp4

Boost options but honestly i don't think anyone uses the dialog thing.
image

@twizmwazin
Copy link
Contributor

I might have been the one user of that dialog option, lol.

@@ -333,4 +333,5 @@
<string name="dialogs_top_nine_month">Top Nine Months</string>
<string name="post_listing_view_source">View Source</string>
<string name="post_listing_view_original">View Original</string>
<string name="back_warning">Repeat action to exit</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there are other actions besides pressing the back button/gesture equivalent that we would need to be concerned about? If not, "Press back again to exit" sounds more natural to me. Otherwise LGTM.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I didn't want to put tap because of the back gesture, but that could work too.

Copy link
Member

Choose a reason for hiding this comment

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

Ya I also like "Press back again to exit"

@MV-GH MV-GH marked this pull request as draft July 10, 2023 07:27
Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

To break the tie 😆 , I think the simple toast works fine, and an extra setting is probably overkill.

@@ -333,4 +333,5 @@
<string name="dialogs_top_nine_month">Top Nine Months</string>
<string name="post_listing_view_source">View Source</string>
<string name="post_listing_view_original">View Original</string>
<string name="back_warning">Repeat action to exit</string>
Copy link
Member

Choose a reason for hiding this comment

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

Ya I also like "Press back again to exit"

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 10, 2023

I was going to add the setting, it can always be expanded to add the dialog.

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 11, 2023

Added all the options

bvTO7H2xxg.mp4

@MV-GH MV-GH marked this pull request as ready for review July 11, 2023 13:29
Copy link
Contributor

@twizmwazin twizmwazin left a comment

Choose a reason for hiding this comment

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

Love it

@twizmwazin twizmwazin enabled auto-merge (squash) July 11, 2023 15:51
@twizmwazin twizmwazin merged commit 1003ac6 into LemmyNet:main Jul 11, 2023
@MV-GH MV-GH deleted the feat/back_warning branch July 11, 2023 16:04
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.

3 participants