Detect duplicate documents (especially on import)
TL;DR: Sometimes when bulk-importing, duplicates might be accidentally imported. Catch these potential duplicates and query if we still want to import.
When performing bulk imports, I occasionally have duplicates present (due to the way my main import source structures PDFs). This ultimately means that what I think might be a unique file actually already exists in GoodNotes. Ideally, this could work at the PDF level, but may only be easily-done on a fuzzy-name basis.
e.g. say the file I'm importing has the name "Mind Games 40c0de54-120f-0d77-9ae5-e96083fb1f9b" – while the UUID present (the 40c0de54-120f-0d77-9ae5-e96083fb1f9b) is very likely to be unique, I may later import a PDF named "Mind Games: Game Engines as an Architecture for Intuitive Physics"... both of these files actually have the same underlying PDF.
In the case of a filename based duplicate detector, it would ask if I wanted to import "Mind Games: Game Engines as an Architecture for Intuitive Physics" because I already have a note named "Mind Games 40c0de54-120f-0d77-9ae5-e96083fb1f9b" since "Mind Games" (especially because of the order/capitalization) could quite likely be the same file.
In the case of a PDF-based duplicate detection, it should be somewhat straightforward to compare the SHA256 of the original PDF backing "Mind Games 40c0de54-120f-0d77-9ae5-e96083fb1f9b" to the incoming PDF named "Mind Games: Game Engines as an Architecture for Intuitive Physics" and if they're the same, there's clearly an overlap, so ask if we still want to import.