Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/phone/src/common/hooks/useExternalApps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const useExternalAppsAction = () => {
const element = document.createElement('script');

element.src = url;
element.type = 'text/javascript';
element.type = 'module';
element.async = true;

document.head.appendChild(element);
Expand Down Expand Up @@ -95,7 +95,7 @@ const useExternalAppsAction = () => {

const configs = await Promise.all(
externalApps.map(async (appName) => {
return appAlreadyLoaded(appName) ?? await generateAppConfig(appName);
return appAlreadyLoaded(appName) ?? (await generateAppConfig(appName));
}),
);

Expand Down
8 changes: 7 additions & 1 deletion apps/phone/src/os/apps/hooks/useApps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ import { SvgIconComponent } from '@mui/icons-material';
import { useTheme } from '@mui/material';
import { useSettingsValue } from '../../../apps/settings/hooks/useSettings';
import { IconSetObject } from '@typings/settings';
import { useRecoilValue } from 'recoil';
import { phoneState } from '@os/phone/hooks/state';

export const useApps = () => {
const { icons } = useNotifications();
const theme = useTheme();
const curIconSet = useSettingsValue().iconSet.value as IconSetObject;
const externalApps = useRecoilValue(phoneState.extApps);

const apps: IApp[] = useMemo(() => {
return APPS.map((app) => {
Expand Down Expand Up @@ -52,7 +55,10 @@ export const useApps = () => {
});
}, [icons, curIconSet, theme]);

const allApps = useMemo(() => [...apps], [apps]);
const allApps = useMemo(
() => [...apps, ...externalApps.filter((app) => app)],
[apps, externalApps],
);
const getApp = useCallback(
(id: string): IApp => {
return allApps.find((a) => a.id === id) || null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ const NotificationBase = forwardRef<HTMLDivElement, NotificationBaseProps>((prop
console.warn('App does not have a notification icon');
}

console.log("app bg", app.backgroundColor)

return (
<SnackbarContent
onClick={handleNotisClick}
Expand Down