billthefarmer / editor

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

Closing and re-opening launches a new instance besides an existing one #205

Closed l3u closed 1 year ago

l3u commented 1 year ago

Hi :-)

First of all: Thanks for this lovely editor!

I'm not sure if this did not happen with older Android versions, however with my new Android 13 phone, if I open the editor and close it via the "home" button, and open it again, a new editor instance is created, although the last one is still running. Edit: I just tried it with my old phone. Same on Android 11.

When starting up, the default "Editor.txt" file is loaded. Home button, launch Editor again. Another instance showing "Editor.txt" appears. When changing the file in the first instance, the second one does not notice it and vice versa. Home and starting again does also start a third, fourth, fifth and so on instance.

I think the expected behavior would be to re-show an already running instance and only to open a new one if there is none running? At least when working on the same file?

Cheers, Tobias

billthefarmer commented 1 year ago

See https://github.com/billthefarmer/editor/issues/184.

l3u commented 1 year ago

I see this is desired behavior when editing different files – but is it really intended to create multiple instances for the same file? Esp. when the "Editor.txt" file is always opened by default?

billthefarmer commented 1 year ago

This behaviour is complicated by recent versions of android which show a screenshot of the app as it was closed in the recents display, which gives the impression the app is still in memory and running. It might be, it depends how it was closed. If it is you get it back as it was if you tap on it, if it isn't you get a new instance.