From 8fcb5ad8741da3c4c8707152aa45c0d5d72b208f Mon Sep 17 00:00:00 2001 From: relikd Date: Sat, 29 Aug 2020 17:49:30 +0200 Subject: [PATCH] No VPN, no recording --- main/Recordings/VCRecordings.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/Recordings/VCRecordings.swift b/main/Recordings/VCRecordings.swift index 6be63b5..0cded7b 100644 --- a/main/Recordings/VCRecordings.swift +++ b/main/Recordings/VCRecordings.swift @@ -55,6 +55,14 @@ class VCRecordings: UIViewController, UINavigationControllerDelegate { @IBAction private func startRecordingButtonTapped(_ sender: UIButton) { if recordingTimer == nil { + guard GlassVPN.state == .on else { + AskAlert(title: "VPN stopped", + text: "You need to start the VPN proxy before you can start a recording.", + buttonText: "Start") { _ in + GlassVPN.setEnabled(true) + }.presentIn(self) + return + } currentRecording = RecordingsDB.startNew() startTimer(animate: true) } else {