mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-15 08:24:50 +02:00
Fix:Back button closes ebook #709
This commit is contained in:
parent
410648e316
commit
2643e98fc0
2 changed files with 12 additions and 0 deletions
|
@ -148,11 +148,16 @@ export default {
|
||||||
this.touchendY = e.changedTouches[0].screenY
|
this.touchendY = e.changedTouches[0].screenY
|
||||||
this.handleGesture()
|
this.handleGesture()
|
||||||
},
|
},
|
||||||
|
closeEvt() {
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
registerListeners() {
|
registerListeners() {
|
||||||
|
this.$eventBus.$on('close-ebook', this.closeEvt)
|
||||||
document.body.addEventListener('touchstart', this.touchstart)
|
document.body.addEventListener('touchstart', this.touchstart)
|
||||||
document.body.addEventListener('touchend', this.touchend)
|
document.body.addEventListener('touchend', this.touchend)
|
||||||
},
|
},
|
||||||
unregisterListeners() {
|
unregisterListeners() {
|
||||||
|
this.$eventBus.$on('close-ebook', this.closeEvt)
|
||||||
document.body.removeEventListener('touchstart', this.touchstart)
|
document.body.removeEventListener('touchstart', this.touchstart)
|
||||||
document.body.removeEventListener('touchend', this.touchend)
|
document.body.removeEventListener('touchend', this.touchend)
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,6 +202,9 @@ export default ({ store, app }, inject) => {
|
||||||
if (store.state.playerIsFullscreen) {
|
if (store.state.playerIsFullscreen) {
|
||||||
eventBus.$emit('minimize-player')
|
eventBus.$emit('minimize-player')
|
||||||
}
|
}
|
||||||
|
if (store.state.showReader) {
|
||||||
|
eventBus.$emit('close-ebook')
|
||||||
|
}
|
||||||
next()
|
next()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -212,6 +215,10 @@ export default ({ store, app }, inject) => {
|
||||||
eventBus.$emit('close-modal')
|
eventBus.$emit('close-modal')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (store.state.showReader) {
|
||||||
|
eventBus.$emit('close-ebook')
|
||||||
|
return
|
||||||
|
}
|
||||||
if (store.state.playerIsFullscreen) {
|
if (store.state.playerIsFullscreen) {
|
||||||
eventBus.$emit('minimize-player')
|
eventBus.$emit('minimize-player')
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue