From b5c486bf1fd7e512536abb23acbfdf795a5184cc Mon Sep 17 00:00:00 2001 From: Emma Date: Mon, 17 Oct 2022 08:33:20 -0400 Subject: [PATCH] Fixing some leftover `showToast(obj)` (#2735) --- src/renderer/views/Watch/Watch.js | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index fd123b99..1395b9fb 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -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)) {