mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 12:33:07 +00:00
1870145674
Fixes #3523
16 lines
396 B
JavaScript
16 lines
396 B
JavaScript
"use strict";
|
|
|
|
import storage from "../localStorage";
|
|
|
|
export default (network, isCollapsed) => {
|
|
const networks = new Set(JSON.parse(storage.get("thelounge.networks.collapsed")));
|
|
network.isCollapsed = isCollapsed;
|
|
|
|
if (isCollapsed) {
|
|
networks.add(network.uuid);
|
|
} else {
|
|
networks.delete(network.uuid);
|
|
}
|
|
|
|
storage.set("thelounge.networks.collapsed", JSON.stringify([...networks]));
|
|
};
|