zbycz / osmapp

Lets make a universal app for OpenStreetMap
https://osmapp.org
GNU General Public License v3.0
218 stars 19 forks source link

[bug] OsmAPP doesn't re-check for updates from OSM while attributes are being edited. #714

Closed govvin closed 2 weeks ago

govvin commented 2 weeks ago

Although a rare case, I did an unusual edit, and observed this behavior:

It might be a good idea to re-check OSM for any changes since the last time data was retrieved, before saving new edits, and potentially losing contributions by editors.

Here's a visualization of the tag changes image

Dlurak commented 2 weeks ago

This seems like an extreme edge case. Maybe we can check that the newest version is the one loaded in osmapp and block the uploading when needed but even that might not be needed.

Do you think this issue occurs in the real world? If not I wouldn't fix it.

govvin commented 2 weeks ago

Yes, this won't probably a popular use-case -- but at the same time, I think we want to avoid OsmAPP causing any data loss, in case it's encountered.

I can see how this issue can happen more often. For example, if I promote OsmAPP in a mapping event as a portable OSM editor, several people might attempt to edit nearby features at or around the same time.

One of these days, I see myself actually doing this for a local mapping event. :smile: We don't want those surprises.

Dlurak commented 2 weeks ago

Oh good point! I once used GoMap While mapping with 3-5 others and it didn't let me upload the data until I resolved all conflicts manually.

Dlurak commented 2 weeks ago

I'm thinking about giving such a toast:

image

As it is an edge case that probably happens very rarely I think it is enough to block the uploading and inform the user about it.

govvin commented 2 weeks ago

When it reloads the data, is there any way to retain the changes the user made (especially new information) into the new form?

Dlurak commented 2 weeks ago

No. The update only makes sure no already made edits are lost.