Skip to content

Commit

Permalink
dont show 'in progress' items in file logger component if the sync pr…
Browse files Browse the repository at this point in the history
…ocess is stopped
  • Loading branch information
AlexMenor committed Jan 7, 2022
1 parent 491020d commit c870ba6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderer/components/SyncInfo/SyncInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ export default {
mounted() {
app.on('SYNC_INFO_UPDATE', this.onInfoUpdate)
app.on('sync-status-changed', this.onSyncStatusChanged)
app.on('SYNC_NEXT', this.onNext)
},
beforeDestroy() {
app.removeListener('SYNC_INFO_UPDATE', this.onInfoUpdate)
app.removeListener('sync-status-changed', this.onSyncStatusChanged)
app.removeListener('SYNC_NEXT', this.onNext)
},
methods: {
onInfoUpdate(item) {
Expand Down Expand Up @@ -117,6 +119,9 @@ export default {
onSyncStatusChanged(newStatus) {
if (newStatus === syncStatus.RUNNING) this.items = []
},
onNext() {
this.items = this.items.filter(item => item.progress === undefined)
},
clear() {},
getStatusMessage(item) {
if (item.action === 'PULL' && item.kind === 'REMOTE') {
Expand Down

0 comments on commit c870ba6

Please sign in to comment.