Remove progress bar status, causes so much issues
This commit is contained in:
2 files changed
+1
-40
No files matched your search
@@ -20,7 +20,6 @@
|
|||||||
"core:window:allow-start-dragging",
|
"core:window:allow-start-dragging",
|
||||||
"core:window:allow-toggle-maximize",
|
"core:window:allow-toggle-maximize",
|
||||||
"core:window:allow-request-user-attention",
|
"core:window:allow-request-user-attention",
|
||||||
"core:window:allow-set-progress-bar",
|
|
||||||
"decorum:allow-show-snap-overlay",
|
"decorum:allow-show-snap-overlay",
|
||||||
"fs:default",
|
"fs:default",
|
||||||
"dialog:default",
|
"dialog:default",
|
||||||
|
|||||||
+1
-39
@@ -37,11 +37,7 @@ import DownloadsPopup from '@/componets/popups/Downloads'
|
|||||||
import VersionVersionPopup from '@/componets/popups/VersionVersion'
|
import VersionVersionPopup from '@/componets/popups/VersionVersion'
|
||||||
import { fetch } from '@tauri-apps/plugin-http'
|
import { fetch } from '@tauri-apps/plugin-http'
|
||||||
import { verifySignature } from '@/lib/Util'
|
import { verifySignature } from '@/lib/Util'
|
||||||
import {
|
import { getCurrentWindow, UserAttentionType } from '@tauri-apps/api/window'
|
||||||
getCurrentWindow,
|
|
||||||
ProgressBarStatus,
|
|
||||||
UserAttentionType
|
|
||||||
} from '@tauri-apps/api/window'
|
|
||||||
|
|
||||||
const roboto = Roboto({
|
const roboto = Roboto({
|
||||||
subsets: ['latin']
|
subsets: ['latin']
|
||||||
@@ -84,7 +80,6 @@ export default function RootLayout ({
|
|||||||
|
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
const revisionCheck = useRef(false)
|
const revisionCheck = useRef(false)
|
||||||
const previousQueueLength = useRef(0)
|
|
||||||
|
|
||||||
function getSpecialVersionsList (game?: number): GameVersion[] {
|
function getSpecialVersionsList (game?: number): GameVersion[] {
|
||||||
if (!normalConfig || !serverVersionList) return []
|
if (!normalConfig || !serverVersionList) return []
|
||||||
@@ -222,10 +217,6 @@ export default function RootLayout ({
|
|||||||
}
|
}
|
||||||
return copy
|
return copy
|
||||||
})
|
})
|
||||||
getCurrentWindow().setProgressBar({
|
|
||||||
status: ProgressBarStatus.Normal,
|
|
||||||
progress: Math.floor(prog)
|
|
||||||
})
|
|
||||||
}).then(f => (unlistenProgress = f))
|
}).then(f => (unlistenProgress = f))
|
||||||
|
|
||||||
listen<string>('download-hash-checking', event => {
|
listen<string>('download-hash-checking', event => {
|
||||||
@@ -456,35 +447,6 @@ export default function RootLayout ({
|
|||||||
normalConfig
|
normalConfig
|
||||||
])
|
])
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (
|
|
||||||
downloadQueue.length === 0 &&
|
|
||||||
downloadProgress.length === 0 &&
|
|
||||||
!isProcessingQueue &&
|
|
||||||
previousQueueLength.current > 0 &&
|
|
||||||
normalConfig?.settings.allowNotifications
|
|
||||||
) {
|
|
||||||
notifyUser('Downloads Finished', 'All downloads have finished.')
|
|
||||||
setTimeout(() => closePopup(), 0)
|
|
||||||
;(async () => {
|
|
||||||
await getCurrentWindow().setProgressBar({
|
|
||||||
status: ProgressBarStatus.None,
|
|
||||||
progress: 0
|
|
||||||
})
|
|
||||||
await getCurrentWindow().requestUserAttention(
|
|
||||||
UserAttentionType.Informational
|
|
||||||
)
|
|
||||||
})()
|
|
||||||
}
|
|
||||||
previousQueueLength.current = downloadQueue.length + downloadProgress.length
|
|
||||||
}, [
|
|
||||||
downloadQueue,
|
|
||||||
downloadProgress,
|
|
||||||
isProcessingQueue,
|
|
||||||
normalConfig,
|
|
||||||
closePopup
|
|
||||||
])
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (revisionCheck.current) return
|
if (revisionCheck.current) return
|
||||||
if (!serverVersionList || !downloadedVersionsConfig) return
|
if (!serverVersionList || !downloadedVersionsConfig) return
|
||||||
|
|||||||
Reference in new issue
Block a user