Show recording how-to at least once after app install
This commit is contained in:
@@ -33,6 +33,10 @@ extension Prefs {
|
||||
get { Prefs.Bool("didShowTutorialRecordings") }
|
||||
set { Prefs.Bool("didShowTutorialRecordings", newValue) }
|
||||
}
|
||||
static var RecordingHowTo: Bool {
|
||||
get { Prefs.Bool("didShowTutorialRecordingHowTo") }
|
||||
set { Prefs.Bool("didShowTutorialRecordingHowTo", newValue) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,15 @@ class VCRecordings: UIViewController, UINavigationControllerDelegate {
|
||||
updateUI(setRecording: false, animated: false)
|
||||
}
|
||||
if !Prefs.DidShowTutorial.Recordings {
|
||||
self.perform(#selector(showTutorial), with: nil, afterDelay: 0.5)
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
let x = TutorialSheet()
|
||||
x.addSheet().addArrangedSubview(TinyMarkdown.load("tut-recording-1"))
|
||||
x.addSheet().addArrangedSubview(TinyMarkdown.load("tut-recording-2"))
|
||||
x.buttonTitleDone = "Got it"
|
||||
x.present {
|
||||
Prefs.DidShowTutorial.Recordings = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +49,15 @@ class VCRecordings: UIViewController, UINavigationControllerDelegate {
|
||||
navigationController?.setNavigationBarHidden(false, animated: animated)
|
||||
}
|
||||
|
||||
@IBAction private func showInfo(_ sender: UIButton?) {
|
||||
let x = TutorialSheet()
|
||||
x.addSheet().addArrangedSubview(TinyMarkdown.load("tut-recording-howto"))
|
||||
x.buttonTitleDone = "Close"
|
||||
x.present() {
|
||||
Prefs.DidShowTutorial.RecordingHowTo = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: Start New Recording
|
||||
|
||||
@@ -53,6 +70,10 @@ class VCRecordings: UIViewController, UINavigationControllerDelegate {
|
||||
}.presentIn(self)
|
||||
return
|
||||
}
|
||||
guard Prefs.DidShowTutorial.RecordingHowTo else {
|
||||
showInfo(nil) // show at least once. Later, user can click the help icon.
|
||||
return
|
||||
}
|
||||
currentRecording = RecordingsDB.startNew()
|
||||
QLog.Debug("start recording #\(currentRecording!.id)")
|
||||
let longterm = sender.selectedSegmentIndex == 1
|
||||
@@ -120,24 +141,4 @@ class VCRecordings: UIViewController, UINavigationControllerDelegate {
|
||||
stopButton.setTitle(valid ? "Stop" : slow ? "Cancel" : "Discard", for: .normal)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: Tutorial View Controller
|
||||
|
||||
@IBAction private func showInfo(_ sender: UIButton) {
|
||||
let x = TutorialSheet()
|
||||
x.addSheet().addArrangedSubview(TinyMarkdown.load("tut-recording-howto"))
|
||||
x.buttonTitleDone = "Close"
|
||||
x.present()
|
||||
}
|
||||
|
||||
@objc private func showTutorial() {
|
||||
let x = TutorialSheet()
|
||||
x.addSheet().addArrangedSubview(TinyMarkdown.load("tut-recording-1"))
|
||||
x.addSheet().addArrangedSubview(TinyMarkdown.load("tut-recording-2"))
|
||||
x.buttonTitleDone = "Got it"
|
||||
x.present {
|
||||
Prefs.DidShowTutorial.Recordings = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# How to record?
|
||||
|
||||
There are two types: app specific recordings and general background activity. The former are usually 3 – 5 minutes long, the latter need to be at least an hour long.
|
||||
Before you begin, there are two types of recordings: app specific recordings and general background activity. The former are usually 3 – 5 minutes long, the latter need to be at least an hour long.
|
||||
|
||||
## App recording
|
||||
|
||||
|
||||
Reference in New Issue
Block a user