Fix: Remove delays causing UI jitter

This commit is contained in:
Beingpax 2025-07-08 22:25:37 +05:45
parent 2838e6b5d4
commit 39caefe500
2 changed files with 0 additions and 5 deletions

View File

@ -290,8 +290,6 @@ extension WhisperState {
// MARK: - Resource Management
func cleanupModelResources() async {
try? await Task.sleep(nanoseconds: 300_000_000)
await whisperContext?.releaseResources()
whisperContext = nil
isModelLoaded = false

View File

@ -59,8 +59,6 @@ extension WhisperState {
NotificationManager.shared.dismissNotification()
}
shouldCancelRecording = true
if isRecording {
await recorder.stopRecording()
}
@ -77,7 +75,6 @@ extension WhisperState {
isMiniRecorderVisible = false
}
try? await Task.sleep(nanoseconds: 150_000_000)
await cleanupModelResources()
}