Skip to content

Commit

Permalink
Fill in the last URL by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
lowfiend authored and Neyo committed Nov 18, 2022
1 parent 3439c09 commit 8a3b2b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FloatPlayer/FormViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class FormViewController: SubViewController, NSTextFieldDelegate {
videoUrlTextField.stringValue = url
loadVideoButton.isEnabled = true
}

videoUrlTextField.stringValue = UserDefaults.standard.string(forKey: "VIDEO_URL") ?? ""
}

func validUrlFromClipboard() -> String? {
Expand Down Expand Up @@ -57,6 +59,8 @@ class FormViewController: SubViewController, NSTextFieldDelegate {
return
}

UserDefaults.standard.set(videoUrl, forKey: "VIDEO_URL")

getWindowController().loadVideoViewController(videoUrl: videoUrl)
}
}

0 comments on commit 8a3b2b6

Please sign in to comment.