Commit Graph

11 Commits

Author SHA1 Message Date
thecodrr
b90858e199 fix: don't run autosync for localOnly items 2022-03-31 11:46:48 +05:00
thecodrr
bb675e9da2 initial 2022-02-08 13:16:41 +05:00
Ammar Ahmed
7e40afafa5 fix: remove note content on trash clear (#21)
* fix content not removed when clear is called in trash

* add test to ensure content is deleted on clearing trash

* tests: clearing trash should clear referenced note history

* add cleanup function for content
2022-01-07 09:17:27 +05:00
thecodrr
4204d8784d test: rewrite notehistory tests for improved correctness 2021-12-22 12:07:07 +05:00
thecodrr
dd9b2815ee fix: forgot to await super.init 2021-12-22 10:03:55 +05:00
thecodrr
e7b34bdbc7 fix: merge dateCreated when upserting session 2021-12-22 10:01:15 +05:00
thecodrr
794eb07574 fix: dateEdited -> dateModified 2021-12-22 10:00:47 +05:00
thecodrr
117e84b599 fix: note history returns all the sessions 2021-12-22 10:00:30 +05:00
thecodrr
6a547286c7 fix: sort note history by newest - oldest 2021-12-22 09:59:19 +05:00
thecodrr
711bb77efa refactor: contenthistory -> sessioncontent 2021-12-22 09:57:12 +05:00
Abdullah Atta
630bb33b10 feat: add note version history (#20)
* feat: note version history

* fix bugs

* add tests for session history

* update tests

* add tests for restoring content

* add more tests

* update jsdoc

* return empty array if no session history present for a note

* init note history with await

* add note history versions limit

* cleanup note history after adding a new session

* fix tests

* add test for session cleanup

* test: add collector tests

* feat: dateEdited -> dateModified

* feat: migrate to liqe for searching

* chore: forceExit jest after test run

* feat: note version history

* fix bugs

* add tests for session history

* update tests

* add tests for restoring content

* add more tests

* update jsdoc

* return empty array if no session history present for a note

* init note history with await

* add note history versions limit

* cleanup note history after adding a new session

* fix tests

* add test for session cleanup

* init ContentHistory with await

* fix reference to db in init

* make sessionId in db

* check if note is locked through note metadata

* make cleanup method private

* use remove methods in notehistory and contenthistory

* restore note content via notes.add method if note is not locked

* move getting all items to seperate functions

* check if parsed json is valid

* deserialize a session only if it's sessionContent exists

* add locked property to sessionContent

* remove makeSessionId function

* update tests

* remove yarn.lock file

* update tests

Co-authored-by: ammarahm-ed <ammarahmed6506@gmail.com>
2021-12-21 13:41:08 +05:00