mirror of
https://github.com/DerTyp7/teamspeak-obs-overlay.git
synced 2025-10-29 21:02:10 +01:00
[feature] now resetting everything on reconnect
This commit is contained in:
@@ -50,4 +50,19 @@ class List {
|
||||
clear() {
|
||||
this.items = [];
|
||||
}
|
||||
|
||||
setItems(items) {
|
||||
// Never tested
|
||||
let duplicateFound = false;
|
||||
items.forEach((e1, i) => {
|
||||
items.forEach((e2, j) => {
|
||||
if (e1.id === e2.id && i != j) {
|
||||
duplicateFound = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
if (!duplicateFound) {
|
||||
this.items = items;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user