chore: test deploy snapshot
This commit is contained in:
@@ -11,6 +11,7 @@ import { EReaderAppView } from '../../../views/play/apps/e-reader/EReaderAppView
|
||||
import {
|
||||
findReadyPlayAppEntryById,
|
||||
getReadyPlayAppEntries,
|
||||
loadPlayAppEntriesFromServer,
|
||||
getSupportedPlayAppEnvironments,
|
||||
isPlayAppSupportedInEnvironment,
|
||||
type PlayAppEntry,
|
||||
@@ -4403,6 +4404,7 @@ export function ChatSharePage() {
|
||||
const composerFocusScrollTimerIdsRef = useRef<number[]>([]);
|
||||
const [isComposerViewportCompacted, setIsComposerViewportCompacted] = useState(false);
|
||||
const [appLaunchUsage, setAppLaunchUsage] = useState<ShareAppLaunchUsageMap>(() => readShareAppLaunchUsage());
|
||||
const [playAppEntriesRevision, setPlayAppEntriesRevision] = useState(0);
|
||||
|
||||
minimizedProgramsRef.current = minimizedPrograms;
|
||||
hasSnapshotRef.current = snapshot != null;
|
||||
@@ -4411,6 +4413,20 @@ export function ChatSharePage() {
|
||||
const isRoomSwitchingRef = useRef(isRoomSwitching);
|
||||
isRoomSwitchingRef.current = isRoomSwitching;
|
||||
|
||||
useEffect(() => {
|
||||
let active = true;
|
||||
|
||||
void loadPlayAppEntriesFromServer().then(() => {
|
||||
if (active) {
|
||||
setPlayAppEntriesRevision((current) => current + 1);
|
||||
}
|
||||
});
|
||||
|
||||
return () => {
|
||||
active = false;
|
||||
};
|
||||
}, []);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
const pendingStage = pendingSnapshotPerfStageRef.current;
|
||||
|
||||
@@ -4427,6 +4443,7 @@ export function ChatSharePage() {
|
||||
}, [snapshot]);
|
||||
|
||||
const shareTokenSetting = snapshot?.share.tokenSetting ?? null;
|
||||
const shareReadyPlayAppEntries = useMemo(() => getReadyPlayAppEntries(), [playAppEntriesRevision]);
|
||||
const shareAllowedAppIdSet = useMemo(
|
||||
() => buildShareAllowedAppIdSet(shareTokenSetting?.allowedAppIds, snapshot?.share.permissions),
|
||||
[shareTokenSetting?.allowedAppIds, snapshot?.share.permissions],
|
||||
@@ -4531,8 +4548,8 @@ export function ChatSharePage() {
|
||||
[shareRuntimeQueuedItems, shareRuntimeRecentItems, shareRuntimeRunningItems],
|
||||
);
|
||||
const allowedPlayAppEntries = useMemo(
|
||||
() => getReadyPlayAppEntries().filter((entry) => shareAllowedAppIdSet.has(entry.id)),
|
||||
[shareAllowedAppIdSet],
|
||||
() => shareReadyPlayAppEntries.filter((entry) => shareAllowedAppIdSet.has(entry.id)),
|
||||
[shareAllowedAppIdSet, shareReadyPlayAppEntries],
|
||||
);
|
||||
const sortedAllowedPlayAppEntries = useMemo(
|
||||
() => [...allowedPlayAppEntries].sort((left, right) => (
|
||||
|
||||
Reference in New Issue
Block a user