Browse Source

Start Google Meet instant meeting from New Instant Meet.

Clicking the New Instant Meet card now opens https://meet.google.com/new in the default browser.

Made-with: Cursor
huzaifahayat12 3 months ago
parent
commit
d0a20dd7c3
1 changed files with 8 additions and 0 deletions
  1. 8 0
      meetings_app/ViewController.swift

+ 8 - 0
meetings_app/ViewController.swift

@@ -259,6 +259,11 @@ private extension ViewController {
         openInAppBrowser(with: url, policy: inAppBrowserDefaultPolicy)
     }
 
+    @objc private func instantMeetClicked(_ sender: NSClickGestureRecognizer) {
+        guard let url = URL(string: "https://meet.google.com/new") else { return }
+        openInDefaultBrowser(url: url)
+    }
+
     private func normalizedURLString(from value: String) -> String {
         if value.lowercased().hasPrefix("http://") || value.lowercased().hasPrefix("https://") {
             return value
@@ -1016,6 +1021,9 @@ private extension ViewController {
         instant.onHoverChanged?(false)
         codeCard.onHoverChanged?(false)
 
+        let instantClick = NSClickGestureRecognizer(target: self, action: #selector(instantMeetClicked(_:)))
+        instant.addGestureRecognizer(instantClick)
+
         row.addArrangedSubview(instant)
         row.addArrangedSubview(codeCard)
         return row