qgis-plugin
qgis-plugin copied to clipboard
When project gets deleted on server ...
The plugin still keeps the association with the remote project. IMO, the project should remain on the local folder but the reference (.mergin folder) should be removed locally, to allow user to download a project with the same name.
Good point! I think we should introduce new local project state, e.g. 'dangling local project'.
After browser refresh we can check against server projects and if it does not exist or server version is lower than local (which actually means that remote project has been deleted and recreated) we would mark such local project as dangling with following actions:
- unsync - preserve data but remove .mergin folder and reference in .ini file
- remove - delete whole folder and remove reference in .ini file
Sounds good. One more option would be to have project unique ID returned in project info - it could be simply pkey from the internal database. That way we could differentiate between projects with certainty. (Avoiding the need to do guessing whether a local project is really the same as the server project.)
Should we take the same approach in Input too?
Yes ideally Input should also have some logic to handle it - I have raised a new ticket for that...