Skip to content

Commit

Permalink
Adds hiding audio book feedback promt/toast
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyedwardspz committed Dec 5, 2023
1 parent aca348e commit 7844889
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
16 changes: 10 additions & 6 deletions pages/item/_id/_episode/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,17 @@ export default {
console.log('Local folder', JSON.stringify(localFolder))
const startDownloadMessage = `Start download for "${this.title}" to folder ${localFolder.name}?`
const { value } = await Dialog.confirm({
title: 'Confirm',
message: startDownloadMessage
})
if (value) {
if (this.isLowFeedback) {
this.startDownload(localFolder)
} else {
const startDownloadMessage = `Start download for "${this.title}" to folder ${localFolder.name}?`
const { value } = await Dialog.confirm({
title: 'Confirm',
message: startDownloadMessage
})
if (value) {
this.startDownload(localFolder)
}
}
},
async selectFolder() {
Expand Down
31 changes: 17 additions & 14 deletions pages/item/_id/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -618,21 +618,24 @@ export default {
}
console.log('Local folder', JSON.stringify(localFolder))
let startDownloadMessage = `Start download for "${this.title}" with ${this.numTracks} audio track${this.numTracks == 1 ? '' : 's'} to folder ${localFolder.name}?`
if (!this.isIos && this.showRead) {
if (this.numTracks > 0) {
startDownloadMessage = `Start download for "${this.title}" with ${this.numTracks} audio track${this.numTracks == 1 ? '' : 's'} and ebook file to folder ${localFolder.name}?`
} else {
startDownloadMessage = `Start download for "${this.title}" with ebook file to folder ${localFolder.name}?`
}
}
const { value } = await Dialog.confirm({
title: 'Confirm',
message: startDownloadMessage
})
if (value) {
if (this.isLowFeedback) {
this.startDownload(localFolder)
} else {
let startDownloadMessage = `Start download for "${this.title}" with ${this.numTracks} audio track${this.numTracks == 1 ? '' : 's'} to folder ${localFolder.name}?`
if (!this.isIos && this.showRead) {
if (this.numTracks > 0) {
startDownloadMessage = `Start download for "${this.title}" with ${this.numTracks} audio track${this.numTracks == 1 ? '' : 's'} and ebook file to folder ${localFolder.name}?`
} else {
startDownloadMessage = `Start download for "${this.title}" with ebook file to folder ${localFolder.name}?`
}
}
const { value } = await Dialog.confirm({
title: 'Confirm',
message: startDownloadMessage
})
if (value) {
this.startDownload(localFolder)
}
}
},
async startDownload(localFolder = null) {
Expand Down

0 comments on commit 7844889

Please sign in to comment.