mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 23:58:17 +00:00
Prevent screen lock during a call
This commit is contained in:
parent
6d8dfbf1a1
commit
69165aa3ed
1 changed files with 4 additions and 0 deletions
|
|
@ -962,6 +962,7 @@ struct ContentView: View {
|
|||
.zIndex(5)
|
||||
.transition(.scale.combined(with: .move(edge: .top)))
|
||||
.onAppear {
|
||||
UIApplication.shared.isIdleTimerDisabled = true
|
||||
callViewModel.resetCallView()
|
||||
if callViewModel.calls.count >= 1 {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
|
|
@ -969,6 +970,9 @@ struct ContentView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
UIApplication.shared.isIdleTimerDisabled = false
|
||||
}
|
||||
}
|
||||
|
||||
ToastView()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue