-
Notifications
You must be signed in to change notification settings - Fork 402
feat(macos): show notification updates #6679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
| Branch | feat/macos/update-notification |
| Testbed | github-actions |
🚨 1 ALERT: Threshold Boundary Limit exceeded!
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Lower Boundary (Limit %) | Upper Boundary (Limit %) |
|---|---|---|---|---|---|
| relayed-udp-server2client | Throughput bits/s | 📈 plot 🚨 alert 🚷 threshold | 314,402,011.07 (-6.55%) | 315,430,130.63 (100.33%) |
Click to view all benchmark results
| Benchmark | Throughput | Benchmark Result bits/s (Result Δ%) | Lower Boundary bits/s (Limit %) |
|---|---|---|---|
| direct-tcp-client2server | 📈 view plot 🚷 view threshold | 271,209,618.86 (+8.24%) | 232,082,905.99 (85.57%) |
| direct-tcp-server2client | 📈 view plot 🚷 view threshold | 281,411,458.29 (+10.12%) | 235,678,725.91 (83.75%) |
| direct-udp-client2server | 📈 view plot 🚷 view threshold | 317,510,636.89 (+8.49%) | 270,542,086.62 (85.21%) |
| direct-udp-server2client | 📈 view plot 🚷 view threshold | 489,638,447.54 (+20.11%) | 379,940,945.38 (77.60%) |
| relayed-tcp-client2server | 📈 view plot 🚷 view threshold | 266,806,482.60 (+6.27%) | 236,935,518.74 (88.80%) |
| relayed-tcp-server2client | 📈 view plot 🚷 view threshold | 286,650,494.10 (+9.42%) | 247,374,155.52 (86.30%) |
| relayed-udp-client2server | 📈 view plot 🚷 view threshold | 250,451,114.19 (+6.59%) | 219,077,045.59 (87.47%) |
| relayed-udp-server2client | 📈 view plot 🚨 view alert 🚷 view threshold | 314,402,011.07 (-6.55%) | 315,430,130.63 (100.33%) |
d78018c to
5e62d6a
Compare
thomaseizinger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I left some feedback, nothing blocking :)
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Show resolved
Hide resolved
| } | ||
|
|
||
| private func startCheckingForUpdates() { | ||
| timer = Timer.scheduledTimer(timeInterval: 6 * 60 * 60, target: self, selector: #selector(checkForUpdates), userInfo: nil, repeats: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a tad more clear to make this a class constant above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Rust we keep the constants as close as possible to where they are used to make it easier to find the context, I think it's good if we keep the same standard across all our platforms.
| guard let versionString = versionString.data(using: .utf8) else { | ||
| return | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this guard be combined with the one above?
| guard let versionInfo = try? JSONDecoder().decode(VersionInfo.self, from: versionString) else { | ||
| return | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one too.
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Show resolved
Hide resolved
…gainst other valid semantic versions
jamilbk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs Changelog updated.
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift
Outdated
Show resolved
Hide resolved
…cation.swift Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
This patch adds a notification for updates for macos clients when they are on an old version.
This is how it looks:
The orange dot is shown regardless of the notification being dismissed.
If the notification is dismissed by the "Dismiss this version" button, until there's no new version there won't be notifications.
Updates are check at the start of firezone and every 6 hours after. This is saved in
UserDefaults.Permissions for notifications needs to be allowed so that it's show, this should be done by the
requestAuthorizationAlso, when an update is available a new
Update available...option appears in the menuThis option, same as the notification takes you to the appstore.