No VPN, no recording

This commit is contained in:
relikd
2020-08-29 17:49:30 +02:00
parent b4bf705b7f
commit 8fcb5ad874

View File

@@ -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 {