Skip to content

Commit

Permalink
Updated food wave
Browse files Browse the repository at this point in the history
  • Loading branch information
s0phialiu committed Feb 18, 2024
1 parent 54d303d commit ae6699a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions HIAPI/Models/Profile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public struct Profile: Codable, APIReturnable {
case userId
case displayName
case points
//case foodWave
case foodWave
case discordTag
case avatarUrl
case coins
Expand All @@ -37,7 +37,7 @@ public struct Profile: Codable, APIReturnable {
public let userId: String
public let displayName: String
public let points: Int
//public let foodWave: Int
public let foodWave: Int
public let discordTag: String
public let avatarUrl: String
public let coins: Int
Expand Down
2 changes: 1 addition & 1 deletion HackIllinois/Models/HIProfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct HIProfile: Codable {
var userId = ""
var displayName = ""
var points = 0
//var foodWave = 0
var foodWave = 0
var timezone = ""
var discordTag = ""
var avatarUrl = ""
Expand Down
4 changes: 2 additions & 2 deletions HackIllinois/ViewControllers/HIProfileViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ extension HIProfileViewController {
profileCardController = UIHostingController(rootView: HIProfileCardView(displayName: profile.displayName,
points: profile.points,
tier: profileTier,
foodWave: 1,
foodWave: profile.foodWave,
avatarUrl: profile.avatarUrl,
userId: profile.userId,
role: role
Expand Down Expand Up @@ -186,7 +186,7 @@ extension HIProfileViewController {
self?.profile.displayName = apiProfile.discordTag
self?.profile.points = apiProfile.points
self?.profile.avatarUrl = apiProfile.avatarUrl
//self?.profile.foodWave = apiProfile.foodWave
self?.profile.foodWave = apiProfile.foodWave
DispatchQueue.main.async {
NotificationCenter.default.post(name: .loginProfile, object: nil, userInfo: ["profile": self?.profile])
self?.updateProfile()
Expand Down

0 comments on commit ae6699a

Please sign in to comment.