36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
// Metro module 10473 (f10474).
|
|
import StageChannelSelfRichPresenceStore from "../stage_channels/StageChannelSelfRichPresenceStore";
|
|
import isUndefinedOrNull from "../../_bundle/isUndefinedOrNull";
|
|
import Module589 from "../../_bundle/Module589";
|
|
import Dispatcher from "../../Dispatcher";
|
|
let c7020_2, c7020_3;
|
|
const updateActivities = function updateActivities() {
|
|
const r1 = [];
|
|
for (const item of c7020_2) {
|
|
const activity = item.getActivity();
|
|
if (activity != null) {
|
|
r1.push(activity);
|
|
}
|
|
}
|
|
const isUndefinedOrNull2 = isUndefinedOrNull(r1, c7020_3);
|
|
let r37 = !isUndefinedOrNull2;
|
|
if (!isUndefinedOrNull2) {
|
|
c7020_3 = r1;
|
|
r37 = true;
|
|
}
|
|
return r37;
|
|
};
|
|
c7020_2 = [StageChannelSelfRichPresenceStore];
|
|
c7020_3 = [];
|
|
class FirstPartyRichPresenceStore extends Module589.Store {
|
|
static displayName = "FirstPartyRichPresenceStore";
|
|
initialize() {
|
|
this.syncWith(c7020_2, updateActivities);
|
|
}
|
|
getActivities() {
|
|
return c7020_3;
|
|
}
|
|
}
|
|
const firstPartyRichPresenceStore = new FirstPartyRichPresenceStore(Dispatcher);
|
|
export default firstPartyRichPresenceStore;
|