Fixing some leftover `showToast(obj)` (#2735)

This commit is contained in:
Emma 2022-10-17 08:33:20 -04:00 committed by GitHub
parent 198c3fa5d2
commit b5c486bf1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 18 deletions

View File

@ -627,12 +627,8 @@ export default Vue.extend({
})
.catch(err => {
const errorMessage = this.$t('Local API Error (Click to copy)')
showToast({
message: `${errorMessage}: ${err}`,
time: 10000,
action: () => {
this.copyToClipboard({ content: err })
}
showToast(`${errorMessage}: ${err}`, 10000, () => {
this.copyToClipboard({ content: err })
})
console.error(err)
if (this.backendPreference === 'local' && this.backendFallback && !err.toString().includes('private')) {
@ -851,12 +847,8 @@ export default Vue.extend({
.catch(err => {
console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)')
showToast({
message: `${errorMessage}: ${err.responseText}`,
time: 10000,
action: () => {
this.copyToClipboard({ content: err.responseText })
}
showToast(`${errorMessage}: ${err.responseText}`, 10000, () => {
this.copyToClipboard({ content: err.responseText })
})
console.error(err)
if (this.backendPreference === 'invidious' && this.backendFallback) {
@ -1042,12 +1034,8 @@ export default Vue.extend({
})
.catch(err => {
const errorMessage = this.$t('Local API Error (Click to copy)')
showToast({
message: `${errorMessage}: ${err}`,
time: 10000,
action: () => {
this.copyToClipboard({ content: err })
}
showToast(`${errorMessage}: ${err}`, 10000, () => {
this.copyToClipboard({ content: err })
})
console.error(err)
if (!process.env.IS_ELECTRON || (this.backendPreference === 'local' && this.backendFallback)) {