Skip to content
Merged
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
8 changes: 2 additions & 6 deletions apps/desktop/src/components/toast/ota.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { check } from "@tauri-apps/plugin-updater";
import { useEffect, useRef } from "react";

import { sonnerToast, toast } from "@hypr/ui/components/ui/toast";
// import { useOngoingSession } from "@hypr/utils/contexts";
import { useOngoingSession } from "@hypr/utils/contexts";
import { DownloadProgress } from "./shared";

// exported for manual update checks
Expand Down Expand Up @@ -86,13 +86,11 @@ export default function OtaNotification() {
// Track dismissed update versions to prevent showing same notification repeatedly
const dismissedVersions = useRef(new Set<string>());

/*
// Check if there's an active meeting session
const ongoingSession = useOngoingSession((state) => ({
status: state.status,
sessionId: state.sessionId,
}));
*/

const appInApplicationsFolder = useQuery({
queryKey: ["app-in-applications-folder"],
Expand All @@ -112,7 +110,7 @@ export default function OtaNotification() {

return null;
},
refetchInterval: 1000 * 60,
refetchInterval: 1000 * 60 * 3,
refetchIntervalInBackground: true,
});

Expand All @@ -129,11 +127,9 @@ export default function OtaNotification() {
}

// Don't show update notifications during active meetings
/*
if (ongoingSession.status === "running_active" || ongoingSession.status === "running_paused") {
return;
}
*/

// Mark this version as shown
dismissedVersions.current.add(update.version);
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/routes/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function Component() {
router.invalidate();
}}
/>
{showNotifications && <Notifications />}
</EditModeProvider>
</SearchProvider>
</NewNoteProvider>
Expand All @@ -196,7 +197,6 @@ function Component() {
{content}
</LicenseRefreshProvider>
)}
{showNotifications && <Notifications />}
</>
);
}
Expand Down
Loading