mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(core): add sys:// support for SF Symbol usage on images with effects (#10555)
This commit is contained in:
@@ -8,6 +8,7 @@ export * from './mainthread-helper';
|
||||
export * from './macrotask-scheduler';
|
||||
|
||||
export const RESOURCE_PREFIX = 'res://';
|
||||
export const SYSTEM_PREFIX = 'sys://';
|
||||
export const FILE_PREFIX = 'file:///';
|
||||
|
||||
export function escapeRegexSymbols(source: string): string {
|
||||
@@ -75,7 +76,8 @@ export function isFileOrResourcePath(path: string): boolean {
|
||||
return (
|
||||
path.indexOf('~/') === 0 || // relative to AppRoot
|
||||
path.indexOf('/') === 0 || // absolute path
|
||||
path.indexOf(RESOURCE_PREFIX) === 0
|
||||
path.indexOf(RESOURCE_PREFIX) === 0 ||
|
||||
path.indexOf(SYSTEM_PREFIX) === 0
|
||||
); // resource
|
||||
}
|
||||
|
||||
@@ -215,7 +217,7 @@ export function queueGC(delay = 900, useThrottle?: boolean) {
|
||||
if (!throttledGC.get(delay)) {
|
||||
throttledGC.set(
|
||||
delay,
|
||||
throttle(() => GC(), delay)
|
||||
throttle(() => GC(), delay),
|
||||
);
|
||||
}
|
||||
throttledGC.get(delay)();
|
||||
@@ -226,7 +228,7 @@ export function queueGC(delay = 900, useThrottle?: boolean) {
|
||||
if (!debouncedGC.get(delay)) {
|
||||
debouncedGC.set(
|
||||
delay,
|
||||
debounce(() => GC(), delay)
|
||||
debounce(() => GC(), delay),
|
||||
);
|
||||
}
|
||||
debouncedGC.get(delay)();
|
||||
|
||||
Reference in New Issue
Block a user