Page MenuHomePhabricator

[native] Cache decrypted media
ClosedPublic

Authored by bartek on Mar 30 2023, 7:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 12:14 PM
Unknown Object (File)
Mon, Nov 4, 3:31 AM
Unknown Object (File)
Mon, Nov 4, 3:31 AM
Unknown Object (File)
Mon, Nov 4, 3:30 AM
Unknown Object (File)
Mon, Nov 4, 3:30 AM
Unknown Object (File)
Mon, Nov 4, 3:30 AM
Unknown Object (File)
Mon, Nov 4, 3:30 AM
Unknown Object (File)
Mon, Nov 4, 3:30 AM
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
No Lint Coverage
Unit
No Test Coverage

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.