71 lines
4.8 KiB
TypeScript
71 lines
4.8 KiB
TypeScript
/* Metro module 14769; source: actions/MentionActionCreators.tsx; dependencies: [661, 694, 507, 2] */
|
|
function _fun111490(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:6, offset: 0x023a4704, size: 211 bytes, params: 8, frame: 18
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_3 = constantsModule.Endpoints;
|
|
const env0_4 = constantsModule.MAX_MENTIONS_PER_FETCH;
|
|
object2 = {setGuildFilter: setGuildFilter, clearMentions: clearMentions, truncateMentions: truncateMentions,
|
|
fetchRecentMentions: fetchRecentMentions, deleteRecentMention: deleteRecentMention,
|
|
setRecentMentionsStale: setRecentMentionsStale};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/MentionActionCreators.tsx');
|
|
exports.default = object2;
|
|
}
|
|
|
|
function setGuildFilter({guildFilter, roleFilter, everyoneFilter}) { // fn#111491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:150, offset: 0x023a47d7, size: 83 bytes, params: 2, frame: 16
|
|
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
dispatcher.dispatch({type: 'SET_RECENT_MENTIONS_FILTER', guildFilter: guildFilter, roleFilter: roleFilter,
|
|
everyoneFilter: everyoneFilter});
|
|
}
|
|
|
|
function clearMentions() { // fn#111492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:311, offset: 0x023a482a, size: 49 bytes, params: 1, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLEAR_MENTIONS'});
|
|
}
|
|
|
|
function truncateMentions(a0) { // fn#111493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:370, offset: 0x023a485b, size: 56 bytes, params: 2, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TRUNCATE_MENTIONS', size: a0});
|
|
}
|
|
|
|
function fetchRecentMentions({before, limit, guildId, roles, everyone, feature}) { // fn#111494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:463, offset: 0x023a4893, size: 247 bytes, params: 2, frame: 23
|
|
const r9 = limit !== undefined ? limit : MAX_MENTIONS_PER_FETCH;
|
|
guildId = guildId === undefined ? null : guildId;
|
|
roles = roles === undefined || roles;
|
|
everyone = everyone === undefined || everyone;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_RECENT_MENTIONS',
|
|
guildId: guildId});
|
|
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
const get = HTTP.get;
|
|
const MENTIONS = Endpoints.MENTIONS;
|
|
return Reflect.apply(get, HTTP, [{'url': null, 'query': null, 'retries': 2, 'oldFormErrors': true,
|
|
'rejectWithError': true, url: MENTIONS, query: {before: before, limit: r9, guild_id: guildId, roles: roles,
|
|
everyone: everyone, feature: feature}}]).then(function({body}) {
|
|
var defaultImport = importDefault(dependencyMap[1]);
|
|
var object = {type: 'LOAD_RECENT_MENTIONS_SUCCESS', messages: body};
|
|
object.isAfter = before != null;
|
|
body = body.length;
|
|
object.hasMoreAfter = body >= MAX_MENTIONS_PER_FETCH;
|
|
defaultImport.dispatch(object);
|
|
}, _fun111496);
|
|
}
|
|
|
|
function deleteRecentMention(a0) { // fn#111497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:937, offset: 0x023a4a1b, size: 119 bytes, params: 2, frame: 17
|
|
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
const del = HTTP.del;
|
|
const object2 = {'url': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': true};
|
|
object2.url = Endpoints.MENTIONS_MESSAGE_ID(a0);
|
|
Reflect.apply(del, HTTP, [object2]);
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RECENT_MENTION_DELETE', id: a0});
|
|
}
|
|
|
|
function setRecentMentionsStale() { // fn#111498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:1110, offset: 0x023a4a92, size: 49 bytes, params: 1, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SET_RECENT_MENTIONS_STALE'});
|
|
}
|
|
|
|
function _fun111496() { // fn#111496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:872, offset: 0x023a49ea, size: 49 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_RECENT_MENTIONS_FAILURE'});
|
|
}
|
|
|