|
|
@ -25,6 +25,8 @@ import {
|
|
|
|
import { appendUserDMConverse } from '../model/user';
|
|
|
|
import { appendUserDMConverse } from '../model/user';
|
|
|
|
import { sharedEvent } from '../event';
|
|
|
|
import { sharedEvent } from '../event';
|
|
|
|
import type { InboxItem } from '../model/inbox';
|
|
|
|
import type { InboxItem } from '../model/inbox';
|
|
|
|
|
|
|
|
import { useGlobalConfigStore } from '../store/globalConfig';
|
|
|
|
|
|
|
|
import type { GlobalConfig } from '../model/config';
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 初始化 Redux 上下文
|
|
|
|
* 初始化 Redux 上下文
|
|
|
@ -285,6 +287,16 @@ function listenNotify(socket: AppSocket, store: AppStore) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
socket.listen(
|
|
|
|
|
|
|
|
'config.updateClientConfig',
|
|
|
|
|
|
|
|
(config: Partial<GlobalConfig>) => {
|
|
|
|
|
|
|
|
useGlobalConfigStore.setState((state) => ({
|
|
|
|
|
|
|
|
...state,
|
|
|
|
|
|
|
|
...config,
|
|
|
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// 其他的额外的通知
|
|
|
|
// 其他的额外的通知
|
|
|
|
socketEventListeners.forEach(({ eventName, eventFn }) => {
|
|
|
|
socketEventListeners.forEach(({ eventName, eventFn }) => {
|
|
|
|
socket.listen(eventName, eventFn);
|
|
|
|
socket.listen(eventName, eventFn);
|
|
|
|