mirror of
https://github.com/thelounge/thelounge
synced 2024-11-24 21:13:06 +00:00
ClientChan: does need a user array after all
This commit is contained in:
parent
3ea5170e6a
commit
29750a3e51
3 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,7 @@ export function toClientChan(shared: SharedNetworkChan): ClientChan {
|
|||
inputHistoryPosition: 0,
|
||||
historyLoading: false,
|
||||
scrolledToBottom: true,
|
||||
users: [],
|
||||
usersOutdated: shared.type === "channel" ? true : false,
|
||||
moreHistoryAvailable: shared.totalMessages > shared.messages.length,
|
||||
inputHistory: history,
|
||||
|
|
|
@ -39,6 +39,7 @@ socket.on("network:status", function (data) {
|
|||
|
||||
if (!data.connected) {
|
||||
network.channels.forEach((channel) => {
|
||||
channel.users = []; // TODO: untangle this
|
||||
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;
|
||||
scrolledToBottom: boolean;
|
||||
usersOutdated: boolean;
|
||||
|
||||
users: ClientUser[];
|
||||
};
|
||||
|
||||
type InitClientChan = ClientChan & {
|
||||
|
|
Loading…
Reference in a new issue