Files
discord-decomp/modules/recent_channels/RecentChannelsActionCreators.tsx
T
2026-11-01 12:12:55 +02:00

31 lines
1015 B
TypeScript

// Metro module 10004 (f10005).
import { AnalyticEvents } from "../../Constants";
import { updateUserGuildSettings, UserSettingsDelay } from "../user_settings/UserSettingsProtoActionCreators";
import { Timestamp } from "../../_bundle/Module1336";
import Dispatcher from "../../Dispatcher";
import AnalyticsUtils from "../../utils/AnalyticsUtils";
let env6653 = {};
export async function bulkClearRecents(c26594_0, c26594_1) {
let env30176;
const r27 = env6653;
let c26594_3 = r27;
const r11 = env30176 = {
$parent: r27
};
let c26594_2 = r11;
env30176[0] = c26594_0;
env30176[1] = c26594_1;
await updateUserGuildSettings(c26594_0, (a0) => {
a0.guildRecentsDismissedAt = Timestamp.fromDate(new Date());
return true;
}, UserSettingsDelay.INFREQUENT_USER_ACTION);
Dispatcher.dispatch({
type: "BULK_CLEAR_RECENTS",
guildId: env30176[0],
channelIds: env30176[1]
});
AnalyticsUtils.track(AnalyticEvents.CHANNEL_LIST_UPDATED, {
action_type: "recents_dismissed"
});
}