-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from tukcomCD2024/iOS
iOS
- Loading branch information
Showing
33 changed files
with
2,608 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+122 KB
(170%)
...odeproj/project.xcworkspace/xcuserdata/jinhyuk.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// FriendRequestList.swift | ||
// Ringo | ||
// | ||
// Created by 강진혁 on 7/30/24. | ||
// | ||
|
||
import Foundation | ||
|
||
class FriendRequestList { | ||
static let shared = FriendRequestList() | ||
private var list: [FriendInfo] = [] | ||
func getList() -> [FriendInfo] { | ||
return list | ||
} | ||
func remove(at index: Int) { | ||
list.remove(at: index) | ||
} | ||
func reload() { | ||
guard let email = UserManager.getData(type: String.self, forKey: .email) else { return } | ||
FriendService.shared.loadRequestList(email: email) { response in | ||
switch response { | ||
case .success(let data): | ||
guard let data = data as? [FriendInfo] else { return } | ||
if !data.isEmpty { | ||
self.list = data | ||
} else { | ||
self.list = data | ||
} | ||
|
||
case .requestErr(let err): | ||
print(err) | ||
case .pathErr: | ||
print("pathErr") | ||
case .serverErr: | ||
print("serverErr") | ||
case .networkFail: | ||
print("networkFail") | ||
case .dataErr: | ||
print("dataErr") | ||
} | ||
} | ||
} | ||
func reset(){ | ||
list = [] | ||
} | ||
} |
Oops, something went wrong.