Page MenuHomePhabricator

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

Authored by bartek on Thu, Nov 7, 3:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 1, 10:26 PM
Unknown Object (File)
Fri, Nov 29, 1:15 AM
Unknown Object (File)
Thu, Nov 28, 11:14 PM
Unknown Object (File)
Thu, Nov 28, 11:00 PM
Unknown Object (File)
Thu, Nov 28, 8:15 PM
Unknown Object (File)
Thu, Nov 28, 8:04 PM
Unknown Object (File)
Thu, Nov 28, 5:07 PM
Unknown Object (File)
Sun, Nov 24, 5:16 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
media-release
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Thu, Nov 7, 4:50 AM
bartek added inline comments.
web/input/input-state-container.react.js
917–920 ↗(On Diff #45686)

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 ↗(On Diff #45686)

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.Thu, Nov 7, 5:35 AM
web/input/input-state-container.react.js
917–920 ↗(On Diff #45686)

Sure! I'll do this

web/input/input-state-container.react.js
917–920 ↗(On Diff #45686)

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)