decord/source/modules/friend_suggestions/FriendSuggestionStore.tsx

163 lines
4.7 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 5895
2026-07-27 11:26:19 +00:00
// Function ID: 52341
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 15, 17, 18, 1858, 1850, 22, 5896, 5897, 566, 686, 2]
2026-07-23 10:11:24 +00:00
2026-07-25 08:10:48 +00:00
// Module 5895 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import apply from "apply";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
import closure_7 from "_isNativeReflectConstruct";
import closure_8 from "_isNativeReflectConstruct";
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
function transformSuggestion(suggestion) {
if (null != suggestion.contact_names) {
if (suggestion.contact_names.length >= 2) {
const contact_names = suggestion.contact_names;
const substr = contact_names.slice(0, 2);
}
const obj = { key: suggestion.suggested_user.id };
let name;
2026-07-23 10:11:24 +00:00
const firstResult = importDefault(22).first(suggestion.reasons);
2026-07-20 16:05:17 +00:00
if (null != firstResult) {
name = firstResult.name;
}
obj.name = name;
const prototype = ctor.prototype;
const tmp9 = new ctor(suggestion.suggested_user);
obj.user = tmp9;
obj.mutualFriendsCount = suggestion.mutual_friends_count;
obj.contactNames = [];
return obj;
}
}
function transformFriendSuggestions(suggestions) {
2026-07-23 10:11:24 +00:00
const obj = importDefault(22);
const mapped = importDefault(22).chain(suggestions).map((arg0) => outer1_14(arg0));
const chainResult = importDefault(22).chain(suggestions);
2026-07-20 16:05:17 +00:00
return mapped.keyBy((key) => key.key).value();
}
let closure_9 = {};
2026-07-23 10:11:24 +00:00
let c10 = 0;
let c11 = false;
let c12 = false;
let tmp2 = ((Store) => {
2026-07-20 16:05:17 +00:00
class FriendSuggestionStore {
constructor() {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_2(this, FriendSuggestionStore);
obj = outer1_5(FriendSuggestionStore);
tmp2 = outer1_4;
if (outer1_13()) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis;
_Reflect = Reflect;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_5;
2026-07-20 16:05:17 +00:00
tmp8 = arguments;
2026-07-23 10:11:24 +00:00
constructResult = Reflect.construct(obj, arguments, outer1_5(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments;
tmp4 = arguments;
constructResult = obj(...arguments);
}
return tmp2(self, constructResult);
}
}
callback2(FriendSuggestionStore, Store);
let obj = {
key: "initialize",
value() {
2026-07-23 10:11:24 +00:00
this.waitFor(outer1_8);
2026-07-20 16:05:17 +00:00
}
};
const items = [obj, , , ];
obj = {
key: "getSuggestionCount",
value() {
2026-07-23 10:11:24 +00:00
return outer1_10;
2026-07-20 16:05:17 +00:00
}
};
items[1] = obj;
obj = {
key: "getSuggestions",
value() {
2026-07-23 10:11:24 +00:00
const entries = Object.entries(outer1_9);
2026-07-20 16:05:17 +00:00
return entries.map((arg0) => {
let tmp;
[, tmp] = arg0;
return tmp;
});
}
};
items[2] = obj;
items[3] = {
key: "getSuggestion",
value(arg0) {
2026-07-23 10:11:24 +00:00
return outer1_9[arg0];
2026-07-20 16:05:17 +00:00
}
};
return callback(FriendSuggestionStore, items);
2026-07-23 10:11:24 +00:00
})(require("initialize").Store);
2026-07-20 16:05:17 +00:00
tmp2.displayName = "FriendSuggestionStore";
2026-07-23 10:11:24 +00:00
tmp2 = new tmp2(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: function handleConnectionOpen(friendSuggestionCount) {
let closure_9 = {};
friendSuggestionCount = friendSuggestionCount.friendSuggestionCount;
if (friendSuggestionCount > 0) {
2026-07-23 10:11:24 +00:00
let c12 = true;
let tmp5 = !c11;
if (!c11) {
tmp5 = c12;
2026-07-20 16:05:17 +00:00
}
if (tmp5) {
2026-07-23 10:11:24 +00:00
c11 = true;
c12 = false;
2026-07-25 08:10:48 +00:00
const response = importDefault(5896).fetch();
const obj = importDefault(5896);
2026-07-20 16:05:17 +00:00
}
} else {
2026-07-25 08:10:48 +00:00
importDefault(5897)();
2026-07-20 16:05:17 +00:00
}
},
FRIEND_SUGGESTION_CREATE: function handleFriendSuggestionCreate(suggestion) {
const tmp = transformSuggestion(suggestion.suggestion);
2026-07-23 10:11:24 +00:00
if (null != obj[tmp.key]) {
2026-07-20 16:05:17 +00:00
return false;
} else {
closure_10 = closure_10 + 1;
2026-07-23 10:11:24 +00:00
obj = {};
const merged = Object.assign(obj);
2026-07-20 16:05:17 +00:00
obj[tmp.key] = tmp;
}
},
FRIEND_SUGGESTION_DELETE: function handleFriendSuggestionDelete(arg0) {
const diff = closure_10 - 1;
closure_10 = diff;
closure_10 = Math.max(0, diff);
2026-07-23 10:11:24 +00:00
delete tmp2[tmp];
2026-07-20 16:05:17 +00:00
},
LOAD_FRIEND_SUGGESTIONS_SUCCESS: function handleLoadFriendSuggestionsSuccess(suggestions) {
2026-07-23 10:11:24 +00:00
let c11 = false;
2026-07-20 16:05:17 +00:00
let closure_9 = transformFriendSuggestions(suggestions.suggestions);
2026-07-23 10:11:24 +00:00
importDefault(22).keys(closure_9).length;
2026-07-20 16:05:17 +00:00
},
LOAD_FRIEND_SUGGESTIONS_FAILURE: function handleLoadFriendSuggestionsFailure() {
2026-07-23 10:11:24 +00:00
let c11 = false;
2026-07-20 16:05:17 +00:00
let closure_9 = {};
}
});
2026-07-23 10:11:24 +00:00
let result = require("_possibleConstructorReturn").fileFinishedImporting("modules/friend_suggestions/FriendSuggestionStore.tsx");
2026-07-20 16:05:17 +00:00
export default tmp2;
export { transformFriendSuggestions };