HomePhabricator
Diffusion Comm f55923678396

Implement JSI to handle unread count from JS

Description

Implement JSI to handle unread count from JS

Summary: This differential implements two JSI calls that can update unread counts for keyservers in MMKV and remove keyservers from MMKV.

Test Plan:

  1. Apply this patch to the code: https://gist.github.com/marcinwasowicz/72f1a3ca842f9ad5e92c59dec67b7eda. This patch adds changes that use those two JSI in a "dirty" way in JS and that query MMKV for keyserver unread counts from NSE.
  2. Build the app and keep it in foreground.
  3. Open web app on the same client and keep marking threads as read and unread. Ensure that logs in Android studio/MacOS console app contain correct values for unread counts.
  4. Background the app and repeat step 3. Ensure that logs in Android studio/MacOS console app contain the last value logged in step 4. This is expected - JS doesn't update MMKV in the background.

Reviewers: bartek, tomek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D11071

Details

Provenance
marcinAuthored on Feb 14 2024, 4:21 AM
Reviewer
tomek
Differential Revision
D11071: Implement JSI to handle unread count from JS
Parents
rCOMM9d9a441f5ea3: Add getter and setter for integers, getter for all keys and function to removeā€¦
Branches
Unknown
Tags
Unknown