Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(store): Remove unused currentSession from vuex store #5491

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

<script>
import Vue, { set } from 'vue'
import { mapActions, mapState } from 'vuex'
import { mapState } from 'vuex'
import { getCurrentUser } from '@nextcloud/auth'
import { loadState } from '@nextcloud/initial-state'
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
Expand Down Expand Up @@ -363,10 +363,6 @@ export default {
this.$providers.forEach(p => p.destroy())
},
methods: {
...mapActions('text', [
'setCurrentSession',
]),

initSession() {
if (!this.hasDocumentParameters) {
this.emit('error', 'No valid file provided')
Expand Down Expand Up @@ -483,7 +479,6 @@ export default {
}
this.lock = this.$syncService.lock
localStorage.setItem('nick', this.currentSession.guestName)
this.setCurrentSession(this.currentSession)
this.$attachmentResolver = new AttachmentResolver({
session: this.currentSession,
user: getCurrentUser(),
Expand Down
9 changes: 0 additions & 9 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import axios from '@nextcloud/axios'

import {
SET_SHOW_AUTHOR_ANNOTATIONS,
SET_CURRENT_SESSION,
SET_VIEW_WIDTH,
SET_HEADINGS,
SET_ATTACHMENT_LIST,
Expand All @@ -42,7 +41,6 @@ Vue.use(Vuex)
export const textModule = {
state: {
showAuthorAnnotations: persistentStorage.getItem('showAuthorAnnotations') === 'true',
currentSession: persistentStorage.getItem('currentSession'),
viewWidth: getClientWidth(),
headings: Object.freeze([]),
attachmentList: [],
Expand All @@ -59,10 +57,6 @@ export const textModule = {
state.showAuthorAnnotations = value
persistentStorage.setItem('showAuthorAnnotations', '' + value)
},
[SET_CURRENT_SESSION](state, value) {
state.currentSession = value
persistentStorage.setItem('currentSession', value)
},
[SET_HEADINGS](state, value) {
if (state.headings.length !== value.length) {
state.headings = Object.freeze(value)
Expand Down Expand Up @@ -90,9 +84,6 @@ export const textModule = {
setShowAuthorAnnotations({ commit }, value) {
commit(SET_SHOW_AUTHOR_ANNOTATIONS, value)
},
setCurrentSession({ commit }, value) {
commit(SET_CURRENT_SESSION, value)
},
setHeadings({ commit }, value) {
commit(SET_HEADINGS, value)
},
Expand Down
1 change: 0 additions & 1 deletion src/store/mutation-types.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const SET_VIEW_WIDTH = 'SET_VIEW_WIDTH'
export const SET_SHOW_AUTHOR_ANNOTATIONS = 'SET_SHOW_AUTHOR_ANNOTATIONS'
export const SET_CURRENT_SESSION = 'SET_CURRENT_SESSION'
export const SET_HEADINGS = 'SET_HEADINGS'
export const SET_ATTACHMENT_LIST = 'SET_ATTACHMENT_LIST'
Loading