billthefarmer / editor

Android simple text editor
https://billthefarmer.github.io/editor
GNU General Public License v3.0
474 stars 85 forks source link

Prompt when selected preferecne "Auto Save" #201

Closed PitcherSeven closed 1 year ago

PitcherSeven commented 1 year ago

By this change we now have a single new method that either saves open changes when preference is set or shows the known prompt asking the user. Additionally this method simplifies 4 code sections where more or less the same was made.

PitcherSeven commented 1 year ago

Closed due wrong destination

billthefarmer commented 1 year ago

This is not a good repository to use if you are new to GitHub/android. It was originally a very simple editor app but it has grown immensely and become complex as it has become popular and I have added enhancements and workarounds to it.

For example the behaviour of the auto save option. This is intended to save the current file if the app is forced into the background by, say, an incoming phone call, or the user opening another app, which it does. If the user deliberately closes the app with unsaved changes, they get a prompt regardless, as intended. It's a waste of effort showing a dialog if the app is forced into the background because it won't appear.