From ae6699a8636a0a5b2e37a6ea110c2cbdd1d04396 Mon Sep 17 00:00:00 2001 From: Sophia Liu Date: Sat, 17 Feb 2024 22:03:21 -0600 Subject: [PATCH] Updated food wave --- HIAPI/Models/Profile.swift | 4 ++-- HackIllinois/Models/HIProfile.swift | 2 +- HackIllinois/ViewControllers/HIProfileViewController.swift | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/HIAPI/Models/Profile.swift b/HIAPI/Models/Profile.swift index 7893681a..9931c089 100644 --- a/HIAPI/Models/Profile.swift +++ b/HIAPI/Models/Profile.swift @@ -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 @@ -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 diff --git a/HackIllinois/Models/HIProfile.swift b/HackIllinois/Models/HIProfile.swift index 89eb3c1f..58d46fbb 100644 --- a/HackIllinois/Models/HIProfile.swift +++ b/HackIllinois/Models/HIProfile.swift @@ -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 = "" diff --git a/HackIllinois/ViewControllers/HIProfileViewController.swift b/HackIllinois/ViewControllers/HIProfileViewController.swift index b1f9af9c..525ecbaf 100644 --- a/HackIllinois/ViewControllers/HIProfileViewController.swift +++ b/HackIllinois/ViewControllers/HIProfileViewController.swift @@ -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 @@ -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()