Page MenuHomePhabricator

[native] Cache decrypted media
ClosedPublic

Authored by bartek on Mar 30 2023, 7:07 AM.
Tags
None
Referenced Files
F1791333: D7254.id24717.diff
Sun, May 19, 12:13 PM
F1791184: D7254.id.diff
Sun, May 19, 11:11 AM
F1791144: D7254.id24392.diff
Sun, May 19, 10:34 AM
F1791108: D7254.id24484.diff
Sun, May 19, 10:25 AM
F1791056: D7254.id24591.diff
Sun, May 19, 9:57 AM
Unknown Object (File)
Sat, May 18, 3:51 AM
Unknown Object (File)
Thu, May 16, 3:30 AM
Unknown Object (File)
Wed, May 8, 11:57 PM
Subscribers

Details

Summary

This diff integrates media cache into app logic.

Depends on D7252, D7228

Test Plan

Sent some encrypted messages, then wiped state. Reopened the app - media are loading slowly. Exit and re-enter thread. The media should be displayed almost immediately

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Mar 30 2023, 9:30 AM
bartek added inline comments.
native/data/sqlite-data-handler.js
73 ↗(On Diff #24392)

I had no better idea where to put this. @kamil suggested that I can use this place but it looks like very SQLite specific

ashoat added inline comments.
native/data/sqlite-data-handler.js
73 ↗(On Diff #24392)

I think this is a good option

native/media/video-playback-modal.react.js
113 ↗(On Diff #24392)

Shorthand

This revision is now accepted and ready to land.Mar 30 2023, 4:40 PM

Rebase, address feedback. Minor fix on video disposal when unmounted

As a result of discussion in D7251, added a call to mediaCacheContext.evictCache() before merging sqlite data.

native/data/sqlite-data-handler.js
149–150 ↗(On Diff #24591)

Do these really need to be awaited in sequence?

This revision was automatically updated to reflect the committed changes.