Commit Graph

133 Commits

Author SHA1 Message Date
thecodrr
e06cf139f0 feat: make db migration on-demand instead of automatic 2022-07-20 07:34:12 +05:00
thecodrr
085926c4aa chore: comment out unused constants 2022-07-07 18:40:12 +05:00
thecodrr
6f5ae16cbc feat: disable time difference calculation 2022-07-07 13:36:18 +05:00
thecodrr
8c65fbb996 fix: request sync before sse connects
(fixes streetwriters/notesnook#465)
2022-04-14 01:10:25 +05:00
thecodrr
d4a7978ee4 feat: add regional pricing api 2022-04-03 03:30:09 +05:00
thecodrr
2d6824cc73 fix: set last synced time from server if there is nothing to sync locally 2022-03-31 11:37:13 +05:00
thecodrr
4135028137 feat: improve sync over websockets 2022-03-30 15:52:48 +05:00
thecodrr
a3bc778660 Merge branch 'master' into websockets-encrypted-sync 2022-03-28 10:17:18 +05:00
Abdullah Atta
c350da9fda feat: add mfa support (#23) 2022-03-11 22:49:24 +05:00
thecodrr
756efd3af1 feat: auto sync on sse connect 2022-03-08 13:17:24 +05:00
thecodrr
6631c08799 fix: don't reconnect sse if it is already connected 2022-03-08 13:17:14 +05:00
thecodrr
bb675e9da2 initial 2022-02-08 13:16:41 +05:00
thecodrr
b80b514bc5 fix: improve time diff checking 2022-01-17 10:25:59 +05:00
thecodrr
ff5439e791 fix: derive local - server time difference more accurately 2022-01-07 12:00:41 +05:00
thecodrr
0bfc195e5f fix: send event if system clock is out of sync 2022-01-03 14:54:06 +05:00
thecodrr
f838826e42 fix: re-enable account password changing 2021-12-31 09:05:45 +05:00
thecodrr
1424756bca fix: turn off caching for notehistory collection 2021-12-22 09:58:28 +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
thecodrr
cadf77e09d fix: init trash & monographs after notes 2021-12-15 15:21:32 +05:00
ammarahm-ed
bc6c9bf15c fix: do not init monographs on app launch 2021-12-14 21:39:10 +05:00
thecodrr
1f6088a864 fix: allow setting ISSUES_HOST 2021-11-24 11:56:18 +05:00
thecodrr
7ed920e49e fix: clear file storage on user logout 2021-11-02 14:31:30 +05:00
thecodrr
05fcf5880d fix: disconnectSSE not defined 2021-10-30 13:51:40 +05:00
thecodrr
011a99d322 fix: improve syncing & merge conflict detection 2021-10-27 10:53:36 +05:00
thecodrr
67674cbc33 fix: improve sync & SSE reliability 2021-10-26 23:06:52 +05:00
thecodrr
888481b858 refactor: sendCheckUserStatusEvent -> checkIsUserPremium 2021-10-26 23:05:47 +05:00
thecodrr
6fab9ad1f3 chore: remove all comments 2021-10-22 16:29:03 +05:00
thecodrr
8cbe5f421a fix: clear auto sync timeout on manual sync 2021-10-04 12:48:14 +05:00
thecodrr
b6a5591966 Merge branch 'master' into attachments 2021-10-04 11:56:52 +05:00
thecodrr
71f7e25a17 fix: send attachmentsLoading event for single item op 2021-10-01 11:16:08 +05:00
thecodrr
6b619e5d3d feat: add upload/download cancellation support 2021-09-29 09:53:50 +05:00
thecodrr
7d16b8f388 feat: refactors and add support for upload/download progress 2021-09-26 11:47:13 +05:00
thecodrr
8ebda5b4fa fix: sse not connecting on user fetch or login 2021-09-15 12:47:22 +05:00
thecodrr
c77bdcd3ce feat: add db.debug for debug related functions 2021-09-15 11:47:10 +05:00
thecodrr
6033cf8740 inital work 2021-09-15 02:16:55 +05:00
thecodrr
765befa580 fix: Cannot read property 'error' of undefined 2021-09-02 13:45:33 +05:00
thecodrr
a500247b3c fix: reconnect SSE on token refresh 2021-08-31 12:11:46 +05:00
thecodrr
b701eec8ab fix: allow overriding SUBSCRIPTIONS_HOST 2021-07-24 12:30:02 +05:00
thecodrr
de3e821c1f feat: add offers api to get platform specific promo codes 2021-07-24 11:13:41 +05:00
thecodrr
d9bbb9fbab fix: improve content cleanup logic 2021-07-03 23:07:43 +05:00
thecodrr
f0dbe822c7 feat: cleanup orphaned content items 2021-07-03 14:50:59 +05:00
thecodrr
14fae70840 feat: send user id when fetching announcements 2021-06-28 10:05:39 +05:00
thecodrr
4e1519bbc8 feat: change automatic sync interval to 5s 2021-06-19 11:07:45 +05:00
thecodrr
73212bee0f fix: remove monographs on logout 2021-06-16 11:53:05 +05:00
thecodrr
5f5377bb0e fix: fetch monograph ids on login 2021-06-16 11:51:39 +05:00
thecodrr
09eac22eaf feat: monograph -> monographs 2021-06-15 11:57:00 +05:00
thecodrr
5bfd1c13d2 feat: init monographs on first publish/unpublish 2021-06-15 11:30:33 +05:00
thecodrr
a41e6c9f4f feat: use an internal monographs cache
This completely detaches monographs from notes allowing
much more flexibility and less bugs.
Since there is only a single source of truth, we can easily do things
like self destruct.
2021-06-15 10:09:10 +05:00
thecodrr
ee98a363b8 feat: implement monograph publishing client 2021-06-13 10:00:24 +05:00
thecodrr
aa3c9c49cd feat: announcement -> announcements 2021-06-12 09:25:04 +05:00