This commit is contained in:
@@ -30,6 +30,7 @@ export default {
|
|||||||
addNotification(options) {
|
addNotification(options) {
|
||||||
|
|
||||||
if (!options.message) {
|
if (!options.message) {
|
||||||
|
console.log("addNotification: No message, skipping this one");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!options.type) {
|
if (!options.type) {
|
||||||
@@ -55,6 +56,7 @@ export default {
|
|||||||
|
|
||||||
//trigger the notification queue handler if it isn't already in action
|
//trigger the notification queue handler if it isn't already in action
|
||||||
if (!this.processing) {
|
if (!this.processing) {
|
||||||
|
console.log("addNotification: NOT processing so calling this.handleNotifcations now...");
|
||||||
this.handleNotifications();
|
this.handleNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,9 +79,6 @@ export default {
|
|||||||
this.processing = true;
|
this.processing = true;
|
||||||
//Process the queue
|
//Process the queue
|
||||||
if (this.notificationQueue.length > 0) {
|
if (this.notificationQueue.length > 0) {
|
||||||
//Move the next item into the current slot
|
|
||||||
this.currentNotification = this.notificationQueue.shift();
|
|
||||||
this.isVisible = true;
|
|
||||||
console.log(
|
console.log(
|
||||||
"handleNotification, just shown currentNotification deets: " +
|
"handleNotification, just shown currentNotification deets: " +
|
||||||
"msg:" +
|
"msg:" +
|
||||||
@@ -91,6 +90,12 @@ export default {
|
|||||||
" queue length is now: " +
|
" queue length is now: " +
|
||||||
this.notificationQueue.length
|
this.notificationQueue.length
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//Move the next item into the current slot
|
||||||
|
this.currentNotification = this.notificationQueue.shift();
|
||||||
|
// this.isVisible = true;
|
||||||
|
this.$nextTick(() => { this.isVisible = true })
|
||||||
|
|
||||||
//Show it for the designated time before moving on to the next
|
//Show it for the designated time before moving on to the next
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log("Timeout-recursing now");
|
console.log("Timeout-recursing now");
|
||||||
|
|||||||
Reference in New Issue
Block a user