This diff factors out the save and copy functions in FullScreenViewModal. Both of these functions are feature specific to image multimedia messages (since they are using things like MediaInfo and ChatMultimediaMessageInfoItem types that are not relevant to user avatars). I also think the concept of saving and copying someone's user avatar is a bit strange, so I felt like it was best just to make this functionality optional in general (if we wanted to in the future we can build out these save/copy callbacks for user avatars as a follow-up). Having these callbacks be optional means that we won't render the save or copy button unless these callbacks are passed down.
This is step 4 in the list below
Outlined below are the steps I will take in this stack (each point here will be it's own diff):
- Introduce FullScreenViewModal file and move everything from the ImageModal file into here, and change what is absolutely necessary (the imports)
- Correct the naming inside of FullScreenViewModal
- Lift out rendering of <Multimedia /> in favor for a generic content child
- Lift save content / copy content functionality out of FullScreenViewModal and make those optional props
- Lift the imageDimensions function out of FullScreenViewModal and introduce a required generic contentDimesions prop
Depends on D9359