Skip to content

Commit

Permalink
Live Activity fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
XITRIX committed Nov 22, 2024
1 parent 4bb1d10 commit 53e424c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions iTorrent/Services/LiveActivityService/LiveActivityService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ private extension LiveActivityService {

@available(iOS 16.1, *)
func update(_ activity: Activity<ProgressWidgetAttributes>, with state: ProgressWidgetAttributes.ContentState) async {
if #available(iOS 16.2, *) {
guard activity.content.state != state
else { return }
} else {
guard activity.contentState != state
else { return }
}
// if #available(iOS 16.2, *) {
// guard activity.content.state != state
// else { return }
// } else {
// guard activity.contentState != state
// else { return }
// }

if let date = throttleMap[activity.attributes.hash],
Int(Date.now.timeIntervalSince(date)) <= Self.throttleDuration
Expand Down

0 comments on commit 53e424c

Please sign in to comment.