diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index 90807940f..809d9f165 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -762,6 +762,8 @@ extension ConversationVC : InputViewDelegate, MessageCellDelegate, ContextMenuAc requestMicrophonePermissionIfNeeded() { [weak self] in self?.cancelVoiceMessageRecording() } + // Keep screen on + UIApplication.shared.isIdleTimerDisabled = false guard AVAudioSession.sharedInstance().recordPermission == .granted else { return } // Cancel any current audio playback audioPlayer?.stop() @@ -810,6 +812,7 @@ extension ConversationVC : InputViewDelegate, MessageCellDelegate, ContextMenuAc } func endVoiceMessageRecording() { + UIApplication.shared.isIdleTimerDisabled = true // Hide the UI snInputView.hideVoiceMessageUI() // Cancel the timer