Merge branches 't3chguy/toasts3' and 't3chguy/toasts3_1' of github.com:matrix-org/matrix-react-sdk into t3chguy/toasts3_1
This commit is contained in:
commit
22dba5f794
7 changed files with 41 additions and 41 deletions
|
@ -59,7 +59,7 @@ export default class ToastStore extends EventEmitter {
|
|||
const oldIndex = this.toasts.findIndex(t => t.key === newToast.key);
|
||||
if (oldIndex === -1) {
|
||||
let newIndex = this.toasts.length;
|
||||
while (newIndex > 0 && this.toasts[newIndex - 1].priority > newToast.priority) --newIndex;
|
||||
while (newIndex > 0 && this.toasts[newIndex - 1].priority < newToast.priority) --newIndex;
|
||||
this.toasts.splice(newIndex, 0, newToast);
|
||||
} else {
|
||||
this.toasts[oldIndex] = newToast;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue