Skip to content

Commit

Permalink
Two more bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishamm committed May 18, 2020
1 parent 4ff9560 commit 8dbbdfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions WHATS_NEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Bug fixes:
- Downloading filaments did not work
- When opening large files in DWC, a timeout exception could be thrown
- When connected in SBC mode, the kinematics key could be incorrectly updated
- Duplicate notifications were not closed again automatically
- Display messages from M117 were displayed multiple times

Version 3.1.0
==============
Expand Down
9 changes: 8 additions & 1 deletion src/plugins/toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export function makeNotification(type, title, message, timeout) {
};
item.resetTimeout = function() {
iziToast.progress(options, toast).reset();
setTimeout(iziToast.progress(options, toast).start, 100);
};

openNotifications.push(item);
Expand Down Expand Up @@ -121,12 +122,18 @@ export function makeFileTransferNotification(type, destination, cancellationToke

export function showMessage(message) {
const options = Object.assign({
class: 'display-message',
title: i18n.t('notification.message'),
message: message.replace(/\n/g, '<br>'),
timeout: false
}, defaults);

iziToast.info(options);
const toastContent = document.querySelector('.display-message p');
if (toastContent) {
toastContent.textContent = message;
} else {
iziToast.info(options);
}
}

export default {
Expand Down

0 comments on commit 8dbbdfc

Please sign in to comment.