mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-11 10:12:19 +02:00
ClientChan: does need a user array after all
This commit is contained in:
parent
3ea5170e6a
commit
29750a3e51
|
@ -20,6 +20,7 @@ export function toClientChan(shared: SharedNetworkChan): ClientChan {
|
||||||
inputHistoryPosition: 0,
|
inputHistoryPosition: 0,
|
||||||
historyLoading: false,
|
historyLoading: false,
|
||||||
scrolledToBottom: true,
|
scrolledToBottom: true,
|
||||||
|
users: [],
|
||||||
usersOutdated: shared.type === "channel" ? true : false,
|
usersOutdated: shared.type === "channel" ? true : false,
|
||||||
moreHistoryAvailable: shared.totalMessages > shared.messages.length,
|
moreHistoryAvailable: shared.totalMessages > shared.messages.length,
|
||||||
inputHistory: history,
|
inputHistory: history,
|
||||||
|
|
|
@ -39,6 +39,7 @@ socket.on("network:status", function (data) {
|
||||||
|
|
||||||
if (!data.connected) {
|
if (!data.connected) {
|
||||||
network.channels.forEach((channel) => {
|
network.channels.forEach((channel) => {
|
||||||
|
channel.users = []; // TODO: untangle this
|
||||||
channel.state = ChanState.PARTED;
|
channel.state = ChanState.PARTED;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
2
client/js/types.d.ts
vendored
2
client/js/types.d.ts
vendored
|
@ -33,6 +33,8 @@ type ClientChan = Omit<SharedChan, "messages"> & {
|
||||||
historyLoading: boolean;
|
historyLoading: boolean;
|
||||||
scrolledToBottom: boolean;
|
scrolledToBottom: boolean;
|
||||||
usersOutdated: boolean;
|
usersOutdated: boolean;
|
||||||
|
|
||||||
|
users: ClientUser[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type InitClientChan = ClientChan & {
|
type InitClientChan = ClientChan & {
|
||||||
|
|
Loading…
Reference in a new issue