appml / neutrinote

neutriNote - the original extensible Markdown + Math note app. Non-commerical. No lock-ins. Only 3 MB footprint & highly optimized. Designed for plaintext purists.
GNU General Public License v3.0
339 stars 23 forks source link

Duplicates being created after changing file name and editing file #18

Closed smord6 closed 2 years ago

smord6 commented 2 years ago

Newest F-Droid version: 3.9.7.1

Describe the bug I changed the name of a file from within the app, and also edited the file within the app, and now I have duplicates popping up every time I do a pull down to refresh gesture.

To Reproduce Steps to reproduce the behavior:

  1. Change file name from books.md to bookscombined.md from within the app
  2. Change first line in bookscombined.md from #Books to #Books Combined
  3. Go back to file list and pull down to refresh
  4. Start getting documents populating my list titled "bookscombined(42).md" and many more numbers

(Possibly either 1 or 2 made this happen on its own, but I happened to do both steps)

Expected behavior Original document is changed without creating duplicates. If this was some type of versioning, perhaps only one duplicate should be created, but I don't believe any duplicates are intended.

Smartphone (please complete the following information):

Moto G Power Android 11

appml commented 2 years ago

Newest F-Droid version: 3.9.7.1

Describe the bug I changed the name of a file from within the app, and also edited the file within the app, and now I have duplicates popping up every time I do a pull down to refresh gesture.

To Reproduce Steps to reproduce the behavior:

  1. Change file name from books.md to bookscombined.md from within the app
  2. Change first line in bookscombined.md from #Books to #Books Combined
  3. Go back to file list and pull down to refresh
  4. Start getting documents populating my list titled "bookscombined(42).md" and many more numbers

(Possibly either 1 or 2 made this happen on its own, but I happened to do both steps)

Expected behavior Original document is changed without creating duplicates. If this was some type of versioning, perhaps only one duplicate should be created, but I don't believe any duplicates are intended.

Smartphone (please complete the following information):

Moto G Power Android 11

I'm able to reproduce the problem and will investigate. Thanks.

smord6 commented 2 years ago

Thanks.

A thought: Does Markdown expect the file name to match the first line?

Example: if the first line says #Book then the file name should be Book.md to avoid an error?

If that's the case, then maybe make the file rename when changing first line with #

appml commented 2 years ago

Thanks.

A thought: Does Markdown expect the file name to match the first line?

Example: if the first line says #Book then the file name should be Book.md to avoid an error?

If that's the case, then maybe make the file rename when changing first line with #

The file name is independent of the first line. So you are free to place any content in the file.

I believe the problem has been identified, a missing step when syncing to the mirror so subsequent refreshes assume the changed title to be a separate file. The build should be picked up by F-Droid in coming days or you can download directly from here. Thanks again.

smord6 commented 2 years ago

Thanks @appml

I tried the build you linked above and can't recreate the problem. It appears fixed so I'm going to close this issue.