Page MenuHomePhabricator

[native][web] Clean up dead conditions for media encryption
ClosedPublic

Authored by bartek on Nov 7 2024, 3:46 AM.
Tags
None
Referenced Files
F3522890: D13892.id45730.diff
Mon, Dec 23, 7:50 AM
F3522889: D13892.id45726.diff
Mon, Dec 23, 7:50 AM
F3522888: D13892.id45717.diff
Mon, Dec 23, 7:50 AM
F3522887: D13892.id45686.diff
Mon, Dec 23, 7:50 AM
F3522886: D13892.id45659.diff
Mon, Dec 23, 7:50 AM
F3522875: D13892.id.diff
Mon, Dec 23, 7:50 AM
F3522870: D13892.diff
Mon, Dec 23, 7:50 AM
Unknown Object (File)
Sat, Dec 21, 11:15 AM
Subscribers

Details

Summary

In D13890 and D13891 some hardcoded switches were flipped, producing a dead code.
Removed unnecessary conditions and simplified code a bit.

Depends on D13891

Test Plan

Flow, eslint, test plans from D13890, D13891 to check for regressions

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D13262
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Nov 7 2024, 4:50 AM
bartek added inline comments.
web/input/input-state-container.react.js
917–920

Technically, now upload type should be always encrypted_{photo,video}, so we could remove the else branch and use invariant here

It seems like we can delete commStaffCommunity and threadInfoInsideCommunity from the codebase as well. What do you think?

web/input/input-state-container.react.js
917–920

I think that would be a good idea. It's better to get rid of this "dead code" and simplify InputStateContainer. Can you make those changes on both native and web before landing?

This revision is now accepted and ready to land.Nov 7 2024, 5:35 AM
web/input/input-state-container.react.js
917–920

Sure! I'll do this

web/input/input-state-container.react.js
917–920

Great – just making sure you didn't miss that I requested to delete commStaffCommunity and threadInfoInsideCommunity as well

Rebase, add invariants for encrypted uploads, remove more dead code: legacy calls

There's now an increasingly long list of "dangling" functions/types that can be removed:

  • commStaffCommunity
  • threadInfoInsideCommunity
  • uploadMultimedia
  • MultimediaUploadExtras

Can you make sure to remove all of these before landing?

I was going to create a separate diff for removing the 'uploadMultimedia' but decided to fixup it into this one

There's now an increasingly long list of "dangling" functions/types that can be removed:

  • commStaffCommunity
  • threadInfoInsideCommunity
  • uploadMultimedia
  • MultimediaUploadExtras

Can you make sure to remove all of these before landing?

They're all now removed in this diff

Thank you!! (Separate diff would've been fine – didn't mean to imply that it had to be in the same diff)