timo
Thank you very much for addressing this issue. I really appreciate those changes and I think that for the most part they actually do solve my problem. However, I have a little bit of mixed feelings about such a solution.
First of all, I really like that there will be no forced merge if the minimum and maximum entry date are the same. It seems like a good metric to decide if the merge is needed or not. With that rule alone I should be able to reliably purge the diary as long as I keep the min and max entry dates consistent. It's great that now I have an actual option for mass cleaning the diary.
I think that the above changes do solve my problem, but i dont like the fact that the solution is implemented through obscure automatic synchronisation rules. As long as I am aware of those rules, it should be fine, but I still have some reservations about Diarium deciding whether the merge on sync is needed or not. There is still a very real possibility for the Diarium to automatically screw up hours of work.
Maybe a new option could be added to the Diarium? A new option can be called "Synchronization policy" or something similar. Such an option could have two optional modes: “automatic” or “paranoid”.
When the Diarium encounters too many deleted entries in the "automatic" mode it will automatically decide in the background if the merge is needed or not. To decide if merge is needed it will use the rules that you have described above.
In the "paranoid" mode, if too many entries are missing, the Diarium could simply wait for the user input and ask the user if the database should be merged or not.
Previously you mentioned that you try to avoid any user interaction during sync because it is impossible when the sync happens in the background. With this approach the background sync without any user interactions is still possible. Sync policy could be set to "automatic" by default for all users and the Diarium will sync with no interactions in the background. However, the optional "paranoid" mode can give the user a choice to disable automatic background merge in exchange for more control.
I think that an option like this could be great. I could keep my sync policy "automatic" during my regular day to day use, but switch it to "paranoid" when i do a diary clean up. That way I can be 100% sure that there definitely will not be any automatic merge on sync.