From 34100f17754da189f288fc8a7ae3910c254d1028 Mon Sep 17 00:00:00 2001 From: "npmbuildbot[bot]" Date: Wed, 21 Oct 2020 14:49:18 +0000 Subject: Compile assets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: npmbuildbot[bot] Signed-off-by: John Molakvoæ (skjnldsv) --- core/src/OC/notification.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/src') diff --git a/core/src/OC/notification.js b/core/src/OC/notification.js index 6207331150f..adac95f1d37 100644 --- a/core/src/OC/notification.js +++ b/core/src/OC/notification.js @@ -21,7 +21,7 @@ import _ from 'underscore' import $ from 'jquery' -import { showMessage } from '@nextcloud/dialogs' +import { showMessage, TOAST_DEFAULT_TIMEOUT, TOAST_PERMANENT_TIMEOUT } from '@nextcloud/dialogs' /** * @todo Write documentation @@ -98,7 +98,7 @@ export default { showHtml(html, options) { options = options || {} options.isHTML = true - options.timeout = (!options.timeout) ? -1 : options.timeout + options.timeout = (!options.timeout) ? TOAST_PERMANENT_TIMEOUT : options.timeout const toast = showMessage(html, options) toast.toastElement.toastify = toast return $(toast.toastElement) @@ -116,7 +116,7 @@ export default { */ show(text, options) { options = options || {} - options.timeout = (!options.timeout) ? -1 : options.timeout + options.timeout = (!options.timeout) ? TOAST_PERMANENT_TIMEOUT : options.timeout const toast = showMessage(text, options) toast.toastElement.toastify = toast return $(toast.toastElement) @@ -133,7 +133,7 @@ export default { if (this.updatableNotification) { this.updatableNotification.hideToast() } - this.updatableNotification = showMessage(text, { timeout: -1 }) + this.updatableNotification = showMessage(text, { timeout: TOAST_PERMANENT_TIMEOUT }) this.updatableNotification.toastElement.toastify = this.updatableNotification return $(this.updatableNotification.toastElement) }, @@ -152,7 +152,7 @@ export default { */ showTemporary(text, options) { options = options || {} - options.timeout = options.timeout || 7 + options.timeout = options.timeout || TOAST_DEFAULT_TIMEOUT const toast = showMessage(text, options) toast.toastElement.toastify = toast return $(toast.toastElement) -- cgit v1.2.3