Skip to content

Commit eff5352

Browse files
authored
Merge pull request #5491 from nextcloud/chore/remove_currentsession_from_store
chore(store): Remove unused currentSession from vuex store
2 parents 5649b50 + cdd50ba commit eff5352

3 files changed

Lines changed: 1 addition & 16 deletions

File tree

src/components/Editor.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383
<script>
8484
import Vue, { set } from 'vue'
85-
import { mapActions, mapState } from 'vuex'
85+
import { mapState } from 'vuex'
8686
import { getCurrentUser } from '@nextcloud/auth'
8787
import { loadState } from '@nextcloud/initial-state'
8888
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
@@ -363,10 +363,6 @@ export default {
363363
this.$providers.forEach(p => p.destroy())
364364
},
365365
methods: {
366-
...mapActions('text', [
367-
'setCurrentSession',
368-
]),
369-
370366
initSession() {
371367
if (!this.hasDocumentParameters) {
372368
this.emit('error', 'No valid file provided')
@@ -483,7 +479,6 @@ export default {
483479
}
484480
this.lock = this.$syncService.lock
485481
localStorage.setItem('nick', this.currentSession.guestName)
486-
this.setCurrentSession(this.currentSession)
487482
this.$attachmentResolver = new AttachmentResolver({
488483
session: this.currentSession,
489484
user: getCurrentUser(),

src/store/index.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import axios from '@nextcloud/axios'
2828

2929
import {
3030
SET_SHOW_AUTHOR_ANNOTATIONS,
31-
SET_CURRENT_SESSION,
3231
SET_VIEW_WIDTH,
3332
SET_HEADINGS,
3433
SET_ATTACHMENT_LIST,
@@ -42,7 +41,6 @@ Vue.use(Vuex)
4241
export const textModule = {
4342
state: {
4443
showAuthorAnnotations: persistentStorage.getItem('showAuthorAnnotations') === 'true',
45-
currentSession: persistentStorage.getItem('currentSession'),
4644
viewWidth: getClientWidth(),
4745
headings: Object.freeze([]),
4846
attachmentList: [],
@@ -59,10 +57,6 @@ export const textModule = {
5957
state.showAuthorAnnotations = value
6058
persistentStorage.setItem('showAuthorAnnotations', '' + value)
6159
},
62-
[SET_CURRENT_SESSION](state, value) {
63-
state.currentSession = value
64-
persistentStorage.setItem('currentSession', value)
65-
},
6660
[SET_HEADINGS](state, value) {
6761
if (state.headings.length !== value.length) {
6862
state.headings = Object.freeze(value)
@@ -90,9 +84,6 @@ export const textModule = {
9084
setShowAuthorAnnotations({ commit }, value) {
9185
commit(SET_SHOW_AUTHOR_ANNOTATIONS, value)
9286
},
93-
setCurrentSession({ commit }, value) {
94-
commit(SET_CURRENT_SESSION, value)
95-
},
9687
setHeadings({ commit }, value) {
9788
commit(SET_HEADINGS, value)
9889
},

src/store/mutation-types.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export const SET_VIEW_WIDTH = 'SET_VIEW_WIDTH'
22
export const SET_SHOW_AUTHOR_ANNOTATIONS = 'SET_SHOW_AUTHOR_ANNOTATIONS'
3-
export const SET_CURRENT_SESSION = 'SET_CURRENT_SESSION'
43
export const SET_HEADINGS = 'SET_HEADINGS'
54
export const SET_ATTACHMENT_LIST = 'SET_ATTACHMENT_LIST'

0 commit comments

Comments
 (0)