Open kirillt opened 2 years ago
Sketch of a prompted deletion scree
Duplicates detection appears to be more important than it seems since duplicates can be false duplicates: two or more resources might have the same id due to collisions of hash function used. Right now, we don't use cryptographical hash functions due to performance reasons. We use CRC32 function and it might have pretty high probability of collisions.
Open questions:
Right now, if a user has several copies of the same file (with the some content and
id
), only one file is displayed. In case of deletion, only one copy is deleted and one of other copies is displayed next time. Tags are stored for all copies at the same time due to usage of content-addressing.Most likely, several copies of the same resource is a user's mistake. But it also might happen intentionally as back-up mechanism. Given that the app is supposed to be used in kinda distributed setup (using external syncing app like Syncthing) such a back-up should be redundant.
It seems like a good idea to detect such duplicates and present information about them to the user as counter on single item. The [delete] button should be replaced by two then: [delete copies] and [delete all]. Maybe it would be simpler to suggest to the user to remove duplicates if such were found. Or preference may be added to the settings screen.