Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4941.js (118.4 MB)
59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
// Module ID: 13039
|
|
// Function ID: 13040
|
|
// Name: DefaultRouteActionCreators
|
|
// Dependencies: [4396, 1074, 4582, 4595, 573, 2]
|
|
// Exports: saveLastNonVoiceRoute, saveLastRoute
|
|
|
|
// Module 13039 (DefaultRouteActionCreators)
|
|
import DispatcherDefault from "Dispatcher" /* 573 */;
|
|
import matchPathCompat from "matchPathCompat" /* 4582 */;
|
|
import RouteUtils from "RouteUtils" /* 4595 */;
|
|
import LurkingStore from "LurkingStore" /* 4396 */;
|
|
|
|
require = fn;
|
|
const Routes = fn(1074).Routes;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("actions/DefaultRouteActionCreators.tsx");
|
|
|
|
export const saveLastRoute = function saveLastRoute(pathname) {
|
|
const obj2 = { path: null };
|
|
const RouteParam = RouteUtils.RouteParam;
|
|
obj2.path = Routes.CHANNEL(RouteParam.guildId());
|
|
const matchPathResult = matchPathCompat.matchPath(pathname, obj2);
|
|
let guildId;
|
|
if (matchPathResult != null) {
|
|
const params = matchPathResult.params;
|
|
if (params != null) {
|
|
guildId = params.guildId;
|
|
}
|
|
}
|
|
let tmp4 = null == guildId;
|
|
if (!tmp4) {
|
|
tmp4 = !LurkingStore.isLurking(guildId);
|
|
}
|
|
if (tmp4) {
|
|
const obj4 = { type: "SAVE_LAST_ROUTE", path: pathname };
|
|
DispatcherDefault.dispatch(obj4);
|
|
}
|
|
};
|
|
export const saveLastNonVoiceRoute = function saveLastNonVoiceRoute(Routes) {
|
|
const obj2 = { path: null };
|
|
const RouteParam = RouteUtils.RouteParam;
|
|
obj2.path = Routes.CHANNEL(RouteParam.guildId());
|
|
const matchPathResult = matchPathCompat.matchPath(Routes, obj2);
|
|
let guildId;
|
|
if (matchPathResult != null) {
|
|
const params = matchPathResult.params;
|
|
if (params != null) {
|
|
guildId = params.guildId;
|
|
}
|
|
}
|
|
let tmp4 = null == guildId;
|
|
if (!tmp4) {
|
|
tmp4 = !LurkingStore.isLurking(guildId);
|
|
}
|
|
if (tmp4) {
|
|
const obj4 = { type: "SAVE_LAST_NON_VOICE_ROUTE", path: Routes };
|
|
DispatcherDefault.dispatch(obj4);
|
|
}
|
|
};
|