Fix: Remove delays causing UI jitter
This commit is contained in:
parent
2838e6b5d4
commit
39caefe500
@ -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
|
||||
|
||||
@ -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()
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user