refactor: fetch release information the same way for manual and automatic checks

This commit is contained in:
zhom
2025-06-17 06:17:57 +04:00
parent 251016609f
commit 2d92cbb0e5
7 changed files with 109 additions and 232 deletions
+4
View File
@@ -25,6 +25,7 @@ import { useAppUpdateNotifications } from "@/hooks/use-app-update-notifications"
import { usePermissions } from "@/hooks/use-permissions";
import type { PermissionType } from "@/hooks/use-permissions";
import { useUpdateNotifications } from "@/hooks/use-update-notifications";
import { useVersionUpdater } from "@/hooks/use-version-updater";
import { showErrorToast } from "@/lib/toast-utils";
import type { BrowserProfile, ProxySettings } from "@/types";
import { invoke } from "@tauri-apps/api/core";
@@ -85,6 +86,9 @@ export default function Home() {
const updateNotifications = useUpdateNotifications(loadProfiles);
const { checkForUpdates, isUpdating } = updateNotifications;
// Version updater for handling version fetching progress events
useVersionUpdater();
// Profiles loader with update check (for initial load and manual refresh)
const loadProfilesWithUpdateCheck = useCallback(async () => {
try {