thanhnguyen2187 / cryptaa

Offline-first blazing fast & secure note taking application
https://cryptaa.pages.dev
MIT License
9 stars 0 forks source link

Success decryption doesn't work #14

Closed thanhnguyen2187 closed 1 month ago

thanhnguyen2187 commented 1 month ago

It seems to be because of the changes in #3, which make context.notes gets reloaded every time Idling is entered. To be more precise, the state transitions are:

  1. Idling: the "normal" screen
  2. Idling.PasswordDecrypt: the password prompt
  3. DataDecrypting: the decryption
  4. Idling: the "normal" screen

When the state transits from step 3 to step 4, within context, note gets recorded and the relevant element in notes is mutated as well, but the mutation is overrode by entering Idling.

We have two ways to solve this:

thanhnguyen2187 commented 1 month ago

Should be resolved by https://github.com/thanhnguyen2187/cryptaa/pull/13/commits/3bde0b0779393e990c00a6c0322735ce1826701d after #13 is merged.