Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add confirmation on exit#998

Merged
twizmwazin merged 7 commits into
LemmyNet:mainfrom
MV-GH:feat/back_warning
Jul 11, 2023
Merged

Add confirmation on exit#998
twizmwazin merged 7 commits into
LemmyNet:mainfrom
MV-GH:feat/back_warning

Conversation

@MV-GH

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

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

MV-GH commented Jul 8, 2023

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
Contributor

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

Comment thread app/src/main/res/values/strings.xml Outdated
<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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@dessalines dessalines left a comment

Copy link
Copy Markdown
Member

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.

Comment thread app/src/main/res/values/strings.xml Outdated
<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
Copy Markdown
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 commented Jul 10, 2023

Copy link
Copy Markdown
Collaborator Author

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

@MV-GH

MV-GH commented Jul 11, 2023

Copy link
Copy Markdown
Collaborator Author

Added all the options

bvTO7H2xxg.mp4

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

@twizmwazin twizmwazin left a comment

Copy link
Copy Markdown
Contributor

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