decord/source/modules/phone/PhoneStore.tsx

49 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 8254
// Function ID: 8255
2026-07-29 08:29:29 +00:00
// Name: handleSetLocationMetadata
2026-08-05 07:35:12 +00:00
// Dependencies: [3936, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-05 07:35:12 +00:00
// Module 8254 (handleSetLocationMetadata)
2026-07-29 08:29:29 +00:00
import DEFAULT_COUNTRY_CODE_NAME from "DEFAULT_COUNTRY_CODE_NAME";
import { DeviceSettingsStore } from "initialize";
2026-07-20 16:05:17 +00:00
function handleSetLocationMetadata(countryCode) {
countryCode = countryCode.countryCode;
if (null != countryCode) {
let tmp2 = getCountryCodeByAlpha2(countryCode);
2026-07-29 08:29:29 +00:00
if (tmp2 == null) {
2026-07-20 16:05:17 +00:00
tmp2 = getDefaultCountryCode();
}
2026-07-29 08:29:29 +00:00
let closure_3 = tmp2;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const getDefaultCountryCode = DEFAULT_COUNTRY_CODE_NAME.getDefaultCountryCode;
const getCountryCodeByAlpha2 = DEFAULT_COUNTRY_CODE_NAME.getCountryCodeByAlpha2;
let closure_3 = getDefaultCountryCode();
class PhoneStore extends DeviceSettingsStore {
}
const prototype = PhoneStore.prototype;
prototype["initialize"] = function initialize(selectedCountryCode) {
if (null != selectedCountryCode) {
selectedCountryCode = selectedCountryCode.selectedCountryCode;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
return { selectedCountryCode: closure_0 };
};
prototype["getCountryCode"] = function getCountryCode() {
return null != closure_0 ? closure_0 : closure_3;
};
PhoneStore.displayName = "PhoneStore";
PhoneStore.persistKey = "PhoneStore";
const phoneStore = new PhoneStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
PHONE_SET_COUNTRY_CODE: function handleSetCountryCode(countryCode) {
countryCode = countryCode.countryCode;
},
CONNECTION_OPEN: handleSetLocationMetadata,
SET_LOCATION_METADATA: handleSetLocationMetadata
});
2026-07-29 08:29:29 +00:00
const result = require("dispatcher").fileFinishedImporting("modules/phone/PhoneStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default phoneStore;