Skip to content

Conversation

@BartoszKlonowski
Copy link
Member

This pull request fixes #16

It removes the off-by-one error in the ID system of the notes collection.


Just like described in the issue, the off-by-one error was caused by the modified approach to storing the notes in the application in-memory repository.
This error occurred when a note with given ID was deleted, but notes were then moved by one in the storage, so the last note (with the highest ID and index in the repository) was lost as the size was matching the ID.

To fix that error and to make the system consequent the ID is completely removed from the Notes storage mechanism. It is redundant and the index of a newly created note is just enough to keep them organized and to handle correct displaying and pages navigation/transition.

NOTE: During the fixing the lack of logo in the details page was noticed - the logo is added within this delivery.

@BartoszKlonowski BartoszKlonowski merged commit f476cbd into main Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect note gets opened after deleting another note

2 participants