summaryrefslogtreecommitdiff
path: root/ui/lib/store/channels.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/lib/store/channels.js')
-rw-r--r--ui/lib/store/channels.js14
1 files changed, 0 insertions, 14 deletions
diff --git a/ui/lib/store/channels.js b/ui/lib/store/channels.js
index 6d722c5..b57ca7e 100644
--- a/ui/lib/store/channels.js
+++ b/ui/lib/store/channels.js
@@ -1,26 +1,17 @@
export class Channels {
constructor() {
this.channels = [];
- this.channelData = {};
}
setChannels(channels) {
this.channels = [...channels];
this.sort();
- this.channelData = channels.reduce(
- (acc, val) => ({
- ...acc,
- [val.id]: val.name,
- }),
- {}
- );
return this;
}
addChannel(id, name) {
this.channels = [...this.channels, { id, name }];
this.sort();
- this.channelData[id] = name;
return this;
}
@@ -29,14 +20,9 @@ export class Channels {
if (channelIndex !== -1) {
this.channels.splice(channelIndex, 1);
}
- delete this.channelData[id];
return this;
}
- get(id) {
- return this.channelData[id];
- }
-
sort() {
this.channels.sort((a, b) => {
if (a.name < b.name) {