decord/source/modules/screen/native/useFontScale.tsx

28 lines
887 B
TypeScript
Raw Normal View History

// Module ID: 5063
// Function ID: 5064
// Name: useFontScale
// Dependencies: [19, 1478, 1480, 2]
2026-07-20 16:05:17 +00:00
// Exports: getFontScale, useFontScale
// Module 5063 (useFontScale)
import AppEntryKeyContext from "AppEntryKeyContext" /* 1480 */;
import noop from "module_19" /* 19 */;
import DimensionsStore from "DimensionsStore" /* 1478 */;
2026-07-23 10:11:24 +00:00
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/screen/native/useFontScale.tsx");
2026-07-20 16:05:17 +00:00
export const getFontScale = function getFontScale() {
let str = arg0;
if (arg0 === undefined) {
str = "main";
}
return DimensionsStore.getState().byAppEntry[str].fontScale;
2026-07-20 16:05:17 +00:00
};
export const useFontScale = function useFontScale() {
const appEntryKey = AppEntryKeyContext.useAppEntryKey();
2026-07-20 16:05:17 +00:00
const items = [appEntryKey];
return DimensionsStore(noop.useCallback((arg0) => arg0.byAppEntry[appEntryKey].fontScale, items));
2026-07-20 16:05:17 +00:00
};