decord/source/actions/DefaultRouteActionCreators.tsx

65 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12693
// Function ID: 12694
2026-07-29 08:29:29 +00:00
// Name: saveLastRoute
2026-08-24 06:08:38 +00:00
// Dependencies: [4025, 676, 4206, 4219, 709, 2]
2026-07-20 16:05:17 +00:00
// Exports: saveLastNonVoiceRoute, saveLastRoute
2026-08-24 06:08:38 +00:00
// Module 12693 (saveLastRoute)
import dispatcherDefault from "dispatcher" /* 709 */;
import matchPath from "matchPath" /* 4206 */;
import RouteParam2 from "RouteParam" /* 4219 */;
import closure_3 from "initialize" /* 4025 */;
import { Routes } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("actions/DefaultRouteActionCreators.tsx");
2026-07-29 08:29:29 +00:00
export const saveLastRoute = function saveLastRoute(pathname) {
2026-08-24 06:08:38 +00:00
let obj = matchPath;
2026-07-29 08:29:29 +00:00
obj = { path: null };
2026-08-24 06:08:38 +00:00
const RouteParam = RouteParam2.RouteParam;
2026-07-29 08:29:29 +00:00
obj[0] = Routes.CHANNEL(RouteParam.guildId());
const matchPathResult = obj.matchPath(pathname, obj);
2026-07-20 16:05:17 +00:00
let guildId;
2026-07-29 08:29:29 +00:00
if (matchPathResult != null) {
2026-07-20 16:05:17 +00:00
const params = matchPathResult.params;
2026-07-29 08:29:29 +00:00
if (params != null) {
2026-07-20 16:05:17 +00:00
guildId = params.guildId;
}
}
2026-07-29 08:29:29 +00:00
let tmp4 = null == guildId;
if (!tmp4) {
2026-08-24 06:08:38 +00:00
tmp4 = !closure_3.isLurking(guildId);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp4) {
obj = { type: "SAVE_LAST_ROUTE", path: null };
obj[1] = pathname;
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch(obj);
const obj3 = dispatcherDefault;
2026-07-20 16:05:17 +00:00
}
};
export const saveLastNonVoiceRoute = function saveLastNonVoiceRoute(Routes) {
2026-08-24 06:08:38 +00:00
let obj = matchPath;
2026-07-29 08:29:29 +00:00
obj = { path: null };
2026-08-24 06:08:38 +00:00
const RouteParam = RouteParam2.RouteParam;
2026-07-29 08:29:29 +00:00
obj[0] = Routes.CHANNEL(RouteParam.guildId());
const matchPathResult = obj.matchPath(Routes, obj);
let guildId;
if (matchPathResult != null) {
const params = matchPathResult.params;
if (params != null) {
guildId = params.guildId;
}
}
let tmp4 = null == guildId;
if (!tmp4) {
2026-08-24 06:08:38 +00:00
tmp4 = !closure_3.isLurking(guildId);
2026-07-29 08:29:29 +00:00
}
if (tmp4) {
obj = { type: "SAVE_LAST_NON_VOICE_ROUTE", path: null };
obj[1] = Routes;
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch(obj);
const obj3 = dispatcherDefault;
2026-07-20 16:05:17 +00:00
}
};