Skip to content

Commit 0cb0086

Browse files
committed
refactor: remove unused event listeners for visible-elements-saved
Since the 'libresign:visible-elements-saved' event is no longer emitted on draft saves, the event listeners and related methods in Request.vue and FilesList.vue are no longer needed. - Removed subscribe/unsubscribe calls - Removed closeSidebar() methods - Removed unused imports from @nextcloud/event-bus Signed-off-by: Vitor Mattos <[email protected]>
1 parent 4e30b9c commit 0cb0086

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/views/FilesList/FilesList.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ import FolderIcon from 'vue-material-design-icons/Folder.vue'
7878
import ListViewIcon from 'vue-material-design-icons/FormatListBulletedSquare.vue'
7979
import ViewGridIcon from 'vue-material-design-icons/ViewGrid.vue'
8080
81-
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
8281
import { loadState } from '@nextcloud/initial-state'
8382
8483
import NcAppContent from '@nextcloud/vue/components/NcAppContent'
@@ -152,11 +151,9 @@ export default {
152151
async mounted() {
153152
await this.filesStore.getAllFiles({ force_fetch: true })
154153
this.loading = false
155-
subscribe('libresign:visible-elements-saved', this.closeSidebar)
156154
this.filesStore.disableIdentifySigner()
157155
},
158156
beforeUnmount() {
159-
unsubscribe('libresign:visible-elements-saved')
160157
this.filesStore.selectFile()
161158
},
162159
methods: {
@@ -166,9 +163,6 @@ export default {
166163
toggleGridView() {
167164
this.userConfigStore.update('grid_view', !this.userConfigStore.grid_view)
168165
},
169-
closeSidebar() {
170-
this.filesStore.selectFile()
171-
},
172166
},
173167
}
174168
</script>

src/views/Request.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
</div>
2323
</template>
2424
<script>
25-
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
26-
2725
import File from '../Components/File/File.vue'
2826
import ReqestPicker from '../Components/Request/RequestPicker.vue'
2927
@@ -42,18 +40,11 @@ export default {
4240
return { filesStore, sidebarStore }
4341
},
4442
async mounted() {
45-
subscribe('libresign:visible-elements-saved', this.closeSidebar)
4643
this.filesStore.disableIdentifySigner()
4744
},
4845
beforeUnmount() {
49-
unsubscribe('libresign:visible-elements-saved')
5046
this.filesStore.selectFile()
5147
},
52-
methods: {
53-
closeSidebar() {
54-
this.filesStore.selectFile()
55-
},
56-
},
5748
}
5849
</script>
5950

0 commit comments

Comments
 (0)