mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
21 lines
622 B
TypeScript
21 lines
622 B
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
import type {GatewayHandlerContext} from '@app/features/gateway/events/EventRouter';
|
|
import GuildList from '@app/features/guild/state/GuildList';
|
|
import UserSettings from '@app/features/user/state/UserSettings';
|
|
|
|
interface UserSettingsPayload {
|
|
flags: number;
|
|
status: string;
|
|
theme: string;
|
|
time_format: number;
|
|
guild_positions: Array<string>;
|
|
locale: string;
|
|
synced_preferences?: string;
|
|
}
|
|
|
|
export function handleUserSettingsUpdate(data: UserSettingsPayload, _context: GatewayHandlerContext): void {
|
|
UserSettings.updateUserSettings(data);
|
|
GuildList.sortGuilds();
|
|
}
|