Web: Fix unsubscribe
This commit is contained in:
parent
57f3d614eb
commit
6de4da217b
@ -791,25 +791,29 @@ class FilesStore {
|
||||
if (folders.length === 0 && this.folders.length === 0) return;
|
||||
|
||||
if (this.folders?.length > 0) {
|
||||
socketHelper.emit({
|
||||
command: "unsubscribe",
|
||||
data: {
|
||||
roomParts: this.folders.map((f) => `DIR-${f.id}`),
|
||||
individual: true,
|
||||
},
|
||||
});
|
||||
this.folders.forEach((f) =>
|
||||
socketHelper.emit({
|
||||
command: "unsubscribe",
|
||||
data: {
|
||||
roomParts: `DIR-${f.id}`,
|
||||
individual: true,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
this.folders = folders;
|
||||
|
||||
if (this.folders?.length > 0) {
|
||||
socketHelper.emit({
|
||||
command: "subscribe",
|
||||
data: {
|
||||
roomParts: this.folders.map((f) => `DIR-${f.id}`),
|
||||
individual: true,
|
||||
},
|
||||
});
|
||||
this.folders.forEach((f) =>
|
||||
socketHelper.emit({
|
||||
command: "subscribe",
|
||||
data: {
|
||||
roomParts: `DIR-${f.id}`,
|
||||
individual: true,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user