diff --git a/components/ui/Chat/Scroll/Scroll.vue b/components/ui/Chat/Scroll/Scroll.vue index 08b56f99df..a82f672c1d 100644 --- a/components/ui/Chat/Scroll/Scroll.vue +++ b/components/ui/Chat/Scroll/Scroll.vue @@ -48,9 +48,6 @@ export default Vue.extend({ dark: this.theme === 'dark', } }, - isMediaOpen() { - return this.$store.state.ui.showMedia - }, }, watch: { // Once a new message is sent diff --git a/store/ui/__snapshots__/state.test.ts.snap b/store/ui/__snapshots__/state.test.ts.snap index d2436f8501..8541b885c2 100644 --- a/store/ui/__snapshots__/state.test.ts.snap +++ b/store/ui/__snapshots__/state.test.ts.snap @@ -90,7 +90,6 @@ Object { }, "settingsRoute": "personalize", "settingsSideBar": true, - "showMedia": false, "showOlderMessagesInfo": false, "showPinned": false, "showSearchResult": false, diff --git a/store/ui/actions.test.ts b/store/ui/actions.test.ts index b2cb49b279..aded8a7457 100644 --- a/store/ui/actions.test.ts +++ b/store/ui/actions.test.ts @@ -148,7 +148,6 @@ const initialState = { showSidebar: true, showSearchResult: false, showSettings: false, - showMedia: false, settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, diff --git a/store/ui/getters.test.ts b/store/ui/getters.test.ts index 76b83bcf2d..70345f317a 100644 --- a/store/ui/getters.test.ts +++ b/store/ui/getters.test.ts @@ -376,7 +376,6 @@ describe('init', () => { ], showSearchResult: false, showSettings: false, - showMedia: false, settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, diff --git a/store/ui/mutations.test.ts b/store/ui/mutations.test.ts index 838fa69cb5..b54d10a3b9 100644 --- a/store/ui/mutations.test.ts +++ b/store/ui/mutations.test.ts @@ -2298,7 +2298,6 @@ describe('mutations', () => { showSidebar: true, showSearchResult: false, showSettings: false, - showMedia: false, settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, @@ -2534,11 +2533,7 @@ describe('mutations', () => { mutations.default.showSidebar(localizedState, true) expect(localizedState.showSidebar).toBeTruthy() }) - test('showMedia', () => { - const localizedState = { ...initialState } - mutations.default.showMedia(localizedState, true) - expect(localizedState.showMedia).toBeTruthy() - }) + test('setContextMenuValues', () => { const localizedState = { ...initialState } mutations.default.setContextMenuValues(localizedState, true) @@ -3480,7 +3475,6 @@ describe('mutations', () => { ], showSearchResult: false, showSettings: false, - showMedia: false, settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, @@ -3623,7 +3617,7 @@ describe('mutations', () => { notifications: [], showSearchResult: false, showSettings: false, - showMedia: false, + settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, @@ -3798,7 +3792,7 @@ describe('mutations', () => { ], showSearchResult: false, showSettings: false, - showMedia: false, + settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, @@ -3950,7 +3944,7 @@ describe('mutations', () => { ], showSearchResult: false, showSettings: false, - showMedia: false, + settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, @@ -4095,7 +4089,7 @@ describe('mutations', () => { ], showSearchResult: false, showSettings: false, - showMedia: false, + settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, @@ -4239,7 +4233,7 @@ describe('mutations', () => { ], showSearchResult: false, showSettings: false, - showMedia: false, + settingsSideBar: true, settingsRoute: 'personalize', quickProfile: false, diff --git a/store/ui/mutations.ts b/store/ui/mutations.ts index 8fde9fe77b..74b21d565e 100644 --- a/store/ui/mutations.ts +++ b/store/ui/mutations.ts @@ -29,9 +29,6 @@ export default { showSidebar(state: UIState, enabled: boolean) { state.showSidebar = enabled }, - showMedia(state: UIState, show: boolean) { - state.showMedia = show - }, setContextMenuValues(state: UIState, values: any) { state.contextMenuValues = values }, diff --git a/store/ui/state.ts b/store/ui/state.ts index e445e1ecfc..de15ad9512 100644 --- a/store/ui/state.ts +++ b/store/ui/state.ts @@ -14,7 +14,6 @@ const InitialUIState = (): UIState => ({ notifications: [], showSearchResult: false, showSettings: false, - showMedia: false, settingsSideBar: true, settingsRoute: SettingsRoutes.PERSONALIZE, quickProfile: false, diff --git a/store/ui/types.ts b/store/ui/types.ts index 2169f7eba5..f9fe56b338 100644 --- a/store/ui/types.ts +++ b/store/ui/types.ts @@ -166,7 +166,6 @@ export interface UIState { contextMenuPosition: object quickProfilePosition: object showSettings: boolean - showMedia: boolean settingsSideBar: boolean settingsRoute: SettingsRoutes showSidebarUsers: boolean diff --git a/store/webrtc/actions.ts b/store/webrtc/actions.ts index ec975f7685..607c56d0ba 100644 --- a/store/webrtc/actions.ts +++ b/store/webrtc/actions.ts @@ -463,7 +463,6 @@ const webRTCActions = { type, }) } - commit('ui/showMedia', true, { root: true }) dispatch('sounds/playSound', Sounds.CALL, { root: true }) } call.on('INCOMING_CALL', onCallIncoming) @@ -471,7 +470,6 @@ const webRTCActions = { function onCallOutgoing({ peerId }: { peerId: string }) { commit('setIncomingCall', undefined) commit('setActiveCall', { callId, peerId }) - commit('ui/showMedia', true, { root: true }) dispatch('sounds/playSound', Sounds.CALL, { root: true }) } call.on('OUTGOING_CALL', onCallOutgoing) @@ -491,7 +489,6 @@ const webRTCActions = { function onCallHangup() { commit('updateCreatedAt', 0) - commit('ui/showMedia', false, { root: true }) commit('conversation/setCalling', false, { root: true }) commit('setIncomingCall', undefined) commit('setActiveCall', undefined)