Update messenger instance if it was already created
Fixed: UI notifications don't bounce around when there is more than one
This commit is contained in:
parent
c2087af8c9
commit
70266c921b
|
@ -7,12 +7,10 @@ define(
|
|||
|
||||
return Marionette.ItemView.extend({
|
||||
|
||||
|
||||
initialize: function () {
|
||||
this.listenTo(this.model, 'change', this.render);
|
||||
},
|
||||
|
||||
|
||||
render: function () {
|
||||
if (!this.model.get('message') || !this.model.get('sendUpdatesToClient')) {
|
||||
return;
|
||||
|
@ -37,7 +35,13 @@ define(
|
|||
message.hideAfter = 0;
|
||||
}
|
||||
|
||||
Messenger.show(message);
|
||||
if (this.messenger) {
|
||||
this.messenger.update(message);
|
||||
}
|
||||
|
||||
else {
|
||||
this.messenger = Messenger.show(message);
|
||||
}
|
||||
|
||||
console.log(message.message);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue