Skip to content

Commit

Permalink
[FirebaseMessaging] fix: typo in the word formatted (#14271)
Browse files Browse the repository at this point in the history
  • Loading branch information
MojtabaHs authored Dec 18, 2024
1 parent 3591c67 commit 1fa25d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions FirebaseMessaging/Apps/Shared/LiveActivityView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ struct LiveActivityView: View {
let ptsToken = Activity<SampleLiveActivityAttributes>.pushToStartToken

if ptsToken != nil {
let ptsTokenString = getFormatedToken(token: ptsToken!)
let ptsTokenString = getFormattedToken(token: ptsToken!)
activityTokenDict["PTS"] = ptsTokenString
} else {
activityTokenDict["PTS"] = "Not available yet.!"
Task {
for await ptsToken in Activity<SampleLiveActivityAttributes>
.pushToStartTokenUpdates {
let ptsTokenString = getFormatedToken(token: ptsToken)
let ptsTokenString = getFormattedToken(token: ptsToken)
activityTokenDict["PTS"] = ptsTokenString
refreshAcitivtyList()
}
Expand All @@ -83,7 +83,7 @@ struct LiveActivityView: View {
let activities = Activity<SampleLiveActivityAttributes>.activities
for activity in activities {
if activity.pushToken != nil {
let activityToken = getFormatedToken(token: activity.pushToken!)
let activityToken = getFormattedToken(token: activity.pushToken!)
activityTokenDict[activity.id] = activityToken
} else {
activityTokenDict[activity.id] = "Not available yet!"
Expand All @@ -92,7 +92,7 @@ struct LiveActivityView: View {
}
}

func getFormatedToken(token: Data) -> String {
func getFormattedToken(token: Data) -> String {
return token.reduce("") {
$0 + String(format: "%02x", $1)
}
Expand All @@ -114,7 +114,7 @@ struct LiveActivityView: View {
if activity != nil {
Task {
for await pushToken in activity!.pushTokenUpdates {
let activityToken = getFormatedToken(token: pushToken)
let activityToken = getFormattedToken(token: pushToken)
activityTokenDict[activity!.id] = activityToken
refreshAcitivtyList()
}
Expand Down

0 comments on commit 1fa25d0

Please sign in to comment.