Removes low feedback toggle

This commit is contained in:
Tony Edwards 2023-12-08 07:15:14 +00:00
parent 78448894d2
commit 9a32396daa
8 changed files with 37 additions and 91 deletions

View file

@ -122,8 +122,7 @@ data class DeviceSettings(
var sleepTimerLength: Long, // Time in milliseconds var sleepTimerLength: Long, // Time in milliseconds
var disableSleepTimerFadeOut: Boolean, var disableSleepTimerFadeOut: Boolean,
var disableSleepTimerResetFeedback: Boolean, var disableSleepTimerResetFeedback: Boolean,
var languageCode: String, var languageCode: String
var enableLowFeedbackMode: Boolean
) { ) {
companion object { companion object {
// Static method to get default device settings // Static method to get default device settings
@ -145,8 +144,7 @@ data class DeviceSettings(
autoSleepTimerAutoRewind = false, autoSleepTimerAutoRewind = false,
autoSleepTimerAutoRewindTime = 300000L, // 5 minutes autoSleepTimerAutoRewindTime = 300000L, // 5 minutes
disableSleepTimerFadeOut = false, disableSleepTimerFadeOut = false,
disableSleepTimerResetFeedback = false, disableSleepTimerResetFeedback = false
enableLowFeedbackMode = false
) )
} }
} }

View file

@ -152,9 +152,6 @@ export default {
}, },
localEpisodeId() { localEpisodeId() {
return this.localEpisode?.id || null return this.localEpisode?.id || null
},
isLowFeedback() {
return this.$store.state.deviceData.deviceSettings.enableLowFeedbackMode
} }
}, },
methods: { methods: {
@ -213,19 +210,14 @@ export default {
console.log('Local folder', JSON.stringify(localFolder)) console.log('Local folder', JSON.stringify(localFolder))
if (this.isLowFeedback) { var startDownloadMessage = `Start download for "${this.title}" to folder ${localFolder.name}?`
const { value } = await Dialog.confirm({
title: 'Confirm',
message: startDownloadMessage
})
if (value) {
this.startDownload(localFolder) this.startDownload(localFolder)
} else {
var 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 startDownload(localFolder) { async startDownload(localFolder) {
var payload = { var payload = {

View file

@ -158,9 +158,6 @@ export default {
}, },
podcast() { podcast() {
return this.episode.podcast || {} return this.episode.podcast || {}
},
isLowFeedback() {
return this.$store.state.deviceData.deviceSettings.enableLowFeedbackMode
} }
}, },
methods: { methods: {
@ -219,18 +216,14 @@ export default {
console.log('Local folder', JSON.stringify(localFolder)) console.log('Local folder', JSON.stringify(localFolder))
if (this.isLowFeedback) { var startDownloadMessage = `Start download for "${this.title}" to folder ${localFolder.name}?`
const { value } = await Dialog.confirm({
title: 'Confirm',
message: startDownloadMessage
})
if (value) {
this.startDownload(localFolder) this.startDownload(localFolder)
} else { }
var 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 startDownload(localFolder) { async startDownload(localFolder) {
var payload = { var payload = {

View file

@ -40,10 +40,6 @@ export default {
}, },
isIos() { isIos() {
return this.$platform === 'ios' return this.$platform === 'ios'
},
isLowFeedback() {
console.log('isLowFeedback', this.$store.state.deviceData.deviceSettings.enableLowFeedbackMode)
return this.$store.state.deviceData.deviceSettings.enableLowFeedbackMode
} }
}, },
methods: { methods: {
@ -60,9 +56,7 @@ export default {
if (!data.localLibraryItem) { if (!data.localLibraryItem) {
this.$toast.error(this.$strings.MessageItemDownloadCompleteFailedToCreate) this.$toast.error(this.$strings.MessageItemDownloadCompleteFailedToCreate)
} else { } else {
if (!this.isLowFeedback) { this.$toast.success(`Item "${data.localLibraryItem.media.metadata.title}" download finished`)
this.$toast.success(`Item "${data.localLibraryItem.media.metadata.title}" download finished`)
}
this.$eventBus.$emit('new-local-library-item', data.localLibraryItem) this.$eventBus.$emit('new-local-library-item', data.localLibraryItem)
} }

View file

@ -398,17 +398,13 @@ export default {
console.log('Local folder', JSON.stringify(localFolder)) console.log('Local folder', JSON.stringify(localFolder))
if (this.isLowFeedback) { 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) 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() { async selectFolder() {

View file

@ -27,7 +27,7 @@
<p v-if="subtitle" class="text-gray-100 text-base">{{ subtitle }}</p> <p v-if="subtitle" class="text-gray-100 text-base">{{ subtitle }}</p>
</div> </div>
<div v-if="hasLocal && !isLowFeedback" class="mx-1"> <div v-if="hasLocal" class="mx-1">
<div v-if="isLocalOnly" class="w-full rounded-md bg-warning/10 border border-warning p-4"> <div v-if="isLocalOnly" class="w-full rounded-md bg-warning/10 border border-warning p-4">
<p class="text-sm">{{ $strings.MessageMediaNotLinkedToServer }}</p> <p class="text-sm">{{ $strings.MessageMediaNotLinkedToServer }}</p>
</div> </div>
@ -454,9 +454,6 @@ export default {
if (width * this.bookCoverAspectRatio > 325) width = 325 / this.bookCoverAspectRatio if (width * this.bookCoverAspectRatio > 325) width = 325 / this.bookCoverAspectRatio
return width return width
},
isLowFeedback() {
return this.$store.state.deviceData.deviceSettings.enableLowFeedbackMode
} }
}, },
methods: { methods: {
@ -618,24 +615,20 @@ export default {
} }
console.log('Local folder', JSON.stringify(localFolder)) console.log('Local folder', JSON.stringify(localFolder))
if (this.isLowFeedback) { 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) 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) { async startDownload(localFolder = null) {

View file

@ -15,12 +15,6 @@
</div> </div>
<p class="pl-4">{{ $strings.LabelLockOrientation }}</p> <p class="pl-4">{{ $strings.LabelLockOrientation }}</p>
</div> </div>
<div class="flex items-center py-3" @click="toggleLowFeedbackMode">
<div class="w-10 flex justify-center">
<ui-toggle-switch v-model="settings.enableLowFeedbackMode" @input="saveSettings" />
</div>
<p class="pl-4">Low Feedback Mode</p>
</div>
<div class="py-3 flex items-center"> <div class="py-3 flex items-center">
<p class="pr-4 w-36">{{ $strings.LabelHapticFeedback }}</p> <p class="pr-4 w-36">{{ $strings.LabelHapticFeedback }}</p>
<div @click.stop="showHapticFeedbackOptions"> <div @click.stop="showHapticFeedbackOptions">
@ -164,8 +158,7 @@ export default {
disableSleepTimerResetFeedback: false, disableSleepTimerResetFeedback: false,
autoSleepTimerAutoRewind: false, autoSleepTimerAutoRewind: false,
autoSleepTimerAutoRewindTime: 300000, // 5 minutes autoSleepTimerAutoRewindTime: 300000, // 5 minutes
languageCode: 'en-us', // 5 minutes languageCode: 'en-us' // 5 minutes
enableLowFeedbackMode: false
}, },
lockCurrentOrientation: false, lockCurrentOrientation: false,
settingInfo: { settingInfo: {
@ -194,10 +187,6 @@ export default {
message: this.$strings.LabelEnableMp3IndexSeekingHelp message: this.$strings.LabelEnableMp3IndexSeekingHelp
name: 'Enable mp3 index seeking', name: 'Enable mp3 index seeking',
message: 'This setting should only be enabled if you have mp3 files that are not seeking correctly. Inaccurate seeking is most likely due to Variable birate (VBR) MP3 files. This setting will force index seeking, in which a time-to-byte mapping is built as the file is read. In some cases with large MP3 files there will be a delay when seeking towards the end of the file.' message: 'This setting should only be enabled if you have mp3 files that are not seeking correctly. Inaccurate seeking is most likely due to Variable birate (VBR) MP3 files. This setting will force index seeking, in which a time-to-byte mapping is built as the file is read. In some cases with large MP3 files there will be a delay when seeking towards the end of the file.'
},
enableLowFeedbackMode: {
name: 'Low feedback mode',
message: 'Danger. This setting will hide confirmation messages, error messages, notifications and feedback within the apps interface. With low feedback enabled, you WILL miss important messages. You WILL experience unexpected behavior. Proceed with caution.'
} }
}, },
hapticFeedbackItems: [ hapticFeedbackItems: [
@ -436,10 +425,6 @@ export default {
this.settings.jumpBackwardsTime = this.jumpBackwardsItems[next].value this.settings.jumpBackwardsTime = this.jumpBackwardsItems[next].value
this.saveSettings() this.saveSettings()
}, },
toggleLowFeedbackMode() {
this.settings.enableLowFeedbackMode = !this.settings.enableLowFeedbackMode
this.saveSettings()
},
async saveSettings() { async saveSettings() {
await this.$hapticsImpact() await this.$hapticsImpact()
const updatedDeviceData = await this.$db.updateDeviceSettings({ ...this.settings }) const updatedDeviceData = await this.$db.updateDeviceSettings({ ...this.settings })
@ -476,8 +461,6 @@ export default {
this.settings.autoSleepTimerAutoRewindTime = !isNaN(deviceSettings.autoSleepTimerAutoRewindTime) ? deviceSettings.autoSleepTimerAutoRewindTime : 300000 // 5 minutes this.settings.autoSleepTimerAutoRewindTime = !isNaN(deviceSettings.autoSleepTimerAutoRewindTime) ? deviceSettings.autoSleepTimerAutoRewindTime : 300000 // 5 minutes
this.settings.languageCode = deviceSettings.languageCode || 'en-us' this.settings.languageCode = deviceSettings.languageCode || 'en-us'
this.settings.enableLowFeedbackMode = !!deviceSettings.enableLowFeedbackMode
} }
}, },
mounted() { mounted() {

View file

@ -75,9 +75,6 @@ export const getters = {
}, },
getOrientationLockSetting: state => { getOrientationLockSetting: state => {
return state.deviceData?.deviceSettings?.lockOrientation return state.deviceData?.deviceSettings?.lockOrientation
},
getLowFeedbackModeSetting: state => {
return state.deviceData?.deviceSettings?.enableLowFeebackMode
} }
} }