Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
69 lines
2.8 KiB
TypeScript
69 lines
2.8 KiB
TypeScript
// Module ID: 16381
|
|
// Function ID: 16382
|
|
// Name: HomeDrawerDirectMessagesRow
|
|
// Dependencies: [19, 17, 4646, 4255, 1074, 21, 4606, 576, 504, 4602, 1114, 16377, 4470, 4467, 2]
|
|
// Exports: default
|
|
|
|
// Module 16381 (HomeDrawerDirectMessagesRow)
|
|
import initialize from "initialize" /* 504 */;
|
|
import nativeDefault from "native" /* 576 */;
|
|
import util from "util" /* 1114 */;
|
|
import HomeDrawerExperiment from "HomeDrawerExperiment" /* 4470 */;
|
|
import Text_Text from "Text/Text" /* 4602 */;
|
|
import HomeDrawerShared from "HomeDrawerShared" /* 16377 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import PresenceStore from "PresenceStore" /* 4646 */;
|
|
import RelationshipStore from "RelationshipStore" /* 4255 */;
|
|
|
|
require = fn;
|
|
function HomeDrawerDMsRow() {
|
|
const tmp = closure_9();
|
|
const items = [RelationshipStore, PresenceStore];
|
|
const stateFromStores = initialize.useStateFromStores(items, () => {
|
|
friendIDs = friendIDs.getFriendIDs();
|
|
return friendIDs.filter((item) => status.getStatus(item) !== constants.OFFLINE).length;
|
|
});
|
|
let tmp5 = null;
|
|
if (stateFromStores > 0) {
|
|
const obj2 = { style: tmp.subtitle, children: null };
|
|
const obj3 = { style: tmp.onlineDot };
|
|
const items1 = [React5(View, obj3), ];
|
|
const obj4 = { variant: "text-xs/medium", color: "text-muted", lineClamp: 1, children: null };
|
|
const intl = tmp2(1114).intl;
|
|
const obj5 = { numFriends: stateFromStores };
|
|
obj4.children = intl.format(tmp2(1114).t.N5UIKr, obj5);
|
|
items1[1] = React5(tmp2(4602).Text, obj4);
|
|
obj2.children = items1;
|
|
tmp5 = React6(View, obj2);
|
|
}
|
|
const obj6 = { title: null, subtitle: null };
|
|
const obj7 = { variant: "text-md/medium", color: "text-default", lineClamp: 1, children: null };
|
|
const intl2 = tmp2(1114).intl;
|
|
obj7.children = intl2.string(util.t.YUU0RF);
|
|
obj6.title = React5(Text_Text.Text, obj7);
|
|
obj6.subtitle = tmp5;
|
|
return React5(HomeDrawerShared.HomeDrawerSharedItem, obj6);
|
|
}
|
|
const View = fn(17).View;
|
|
const StatusTypes = fn(1074).StatusTypes;
|
|
const jsxProd = fn(21);
|
|
({ jsx: closure_7, jsxs: closure_8 } = jsxProd);
|
|
const createStyles = fn(4606);
|
|
let obj2 = { subtitle: { flexDirection: "row", alignItems: "center", gap: 4 }, onlineDot: null };
|
|
let size = { width: 8, height: 8, borderRadius: nativeDefault.radii.round, backgroundColor: nativeDefault.colors.TEXT_STATUS_ONLINE };
|
|
obj2.onlineDot = size;
|
|
let closure_9 = createStyles.createStyles(obj2);
|
|
size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/home_drawer/native/HomeDrawerDirectMessagesRow.tsx");
|
|
|
|
export default function HomeDrawerDMsRowWrapper() {
|
|
const MobileHomeDrawerExperiment = HomeDrawerExperiment.MobileHomeDrawerExperiment;
|
|
let tmp2 = null;
|
|
if (MobileHomeDrawerExperiment.useConfig({ location: "dm-expanded-children" }).enableHome) {
|
|
tmp2 = null;
|
|
if (!tmp) {
|
|
tmp2 = React5(HomeDrawerDMsRow, {});
|
|
}
|
|
}
|
|
return tmp2;
|
|
};
|