Skip to content

Commit

Permalink
fix: remove container getters, setters and store
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Sep 19, 2024
1 parent b995da5 commit 976f679
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 77 deletions.
7 changes: 1 addition & 6 deletions src/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ __webpack_public_path__ = OC.linkTo('spreed', 'js/')

window.OCP.Collaboration.registerType('room', {
action: async () => {
const conversation = await requestRoomSelection('spreed-room-select', {
// Even if it is used from Talk the Collections menu is
// independently loaded, so the properties that depend
// on the store need to be explicitly injected.
container: window.store ? window.store.getters.getMainContainerSelector() : undefined,
})
const conversation = await requestRoomSelection('spreed-room-select', {})
if (!conversation) {
throw new Error('User cancelled resource selection')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
participants() {
return this.$store.getters.participantsList(this.token).filter(participant => {
return (participant.participantType === PARTICIPANT.TYPE.USER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,6 @@ export default {
? t('spreed', 'not running, check Matterbridge log')
: t('spreed', 'not running')
},
container() {
return this.$store.getters.getMainContainerSelector()
},
},
beforeMount() {
Expand Down
4 changes: 0 additions & 4 deletions src/components/TopBar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
isOneToOneConversation() {
return this.conversation.type === CONVERSATION.TYPE.ONE_TO_ONE
|| this.conversation.type === CONVERSATION.TYPE.ONE_TO_ONE_FORMER
Expand Down
5 changes: 0 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { getRequestToken } from '@nextcloud/auth'
import { emit } from '@nextcloud/event-bus'
import { generateFilePath } from '@nextcloud/router'

import { options as TooltipOptions } from '@nextcloud/vue/dist/Directives/Tooltip.js'

import App from './App.vue'

import './init.js'
Expand Down Expand Up @@ -51,9 +49,6 @@ Vue.use(VueRouter)

const pinia = createPinia()

TooltipOptions.container = 'body'
store.dispatch('setMainContainerSelector', 'body')

const instance = new Vue({
el: '#content',
store,
Expand Down
2 changes: 0 additions & 2 deletions src/mainFilesSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ Vue.use(Vuex)

const pinia = createPinia()

store.dispatch('setMainContainerSelector', 'body')

const newCallView = () => new Vue({
store,
pinia,
Expand Down
1 change: 0 additions & 1 deletion src/mainPublicShareAuthSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Vue.use(PiniaVuePlugin)
Vue.use(Vuex)

const pinia = createPinia()
store.dispatch('setMainContainerSelector', 'body')

/**
* Wraps all the body contents in its own container.
Expand Down
2 changes: 0 additions & 2 deletions src/mainPublicShareSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ Vue.use(Vuex)

const pinia = createPinia()

store.dispatch('setMainContainerSelector', 'body')

/**
*
*/
Expand Down
5 changes: 0 additions & 5 deletions src/mainRecording.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import Vuex from 'vuex'
import { getRequestToken } from '@nextcloud/auth'
import { generateFilePath } from '@nextcloud/router'

import { options as TooltipOptions } from '@nextcloud/vue/dist/Directives/Tooltip.js'

import Recording from './Recording.vue'

import router from './router/router.js'
Expand Down Expand Up @@ -52,9 +50,6 @@ Vue.use(VueRouter)

const pinia = createPinia()

TooltipOptions.container = 'body'
store.dispatch('setMainContainerSelector', 'body')

window.store = store

if (!window.OCA.Talk) {
Expand Down
2 changes: 0 additions & 2 deletions src/store/storeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import messagesStore from './messagesStore.js'
import participantsStore from './participantsStore.js'
import soundsStore from './soundsStore.js'
import tokenStore from './tokenStore.js'
import uiModeStore from './uiModeStore.js'

export default {
modules: {
Expand All @@ -25,7 +24,6 @@ export default {
participantsStore,
soundsStore,
tokenStore,
uiModeStore,
},

mutations: {},
Expand Down
43 changes: 0 additions & 43 deletions src/store/uiModeStore.js

This file was deleted.

0 comments on commit 976f679

Please sign in to comment.