28 lines
984 B
TypeScript
28 lines
984 B
TypeScript
// Metro module 12805 (f12806).
|
|
import AuthenticationStore from "./AuthenticationStore";
|
|
import RelationshipStore from "./RelationshipStore";
|
|
import Durations from "../utils/Durations";
|
|
import SnowflakeUtils from "../utils/SnowflakeUtils";
|
|
import Module589 from "../_bundle/Module589";
|
|
import Dispatcher from "../Dispatcher";
|
|
let c8832_4 = 180 * Durations.Millis.DAY;
|
|
let c8832_5 = false;
|
|
class PremiumPromoStore extends Module589.Store {
|
|
static displayName = "PremiumPromoStore";
|
|
initialize() {
|
|
this.waitFor(RelationshipStore, AuthenticationStore);
|
|
}
|
|
isEligible() {
|
|
return c8832_5;
|
|
}
|
|
}
|
|
const premiumPromoStore = new PremiumPromoStore(Dispatcher, {
|
|
CONNECTION_OPEN: function updatePremiumPromoEligibility() {
|
|
const r3 = c8832_5;
|
|
const r1 = RelationshipStore.getFriendIDs().length >= 10 && SnowflakeUtils.extractTimestamp(AuthenticationStore.getId()) < Date.now() - c8832_4;
|
|
c8832_5 = r1;
|
|
return r3 !== r1;
|
|
}
|
|
});
|
|
export default premiumPromoStore;
|