Skip to content

Commit 2f48225

Browse files
author
Jaesung
authored
Merge pull request #54 from sendbird/feature/jaesung/fix-call-historycell
Fix nickname bug on call history view
2 parents 4c6dae6 + 33ba038 commit 2f48225

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

QuickStart/CallHistory/CallHistory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct CallHistory: Codable {
3535
let remoteUser = callLog.myRole == .caller ? callLog.callee : callLog.caller
3636
self.remoteUserProfileURL = remoteUser?.profileURL
3737
self.remoteUserID = remoteUser?.userId ?? "Unknown"
38-
self.remoteNickname = remoteUser?.nickname ?? ""
38+
self.remoteNickname = (remoteUser?.nickname).unwrap(with: "-")
3939

4040
self.startedAt = CallHistory.dateFormatter.string(from: Date(timeIntervalSince1970: Double(callLog.startedAt) / 1000))
4141
self.duration = callLog.duration.timerText()

QuickStart/CallHistory/CallHistoryViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class CallHistoryViewController: UIViewController, UITableViewDataSource, UITabl
132132
extension CallHistoryViewController {
133133
// When select table view cell, make a call based on its `CallHistory` information.
134134
func didTapCallHistoryCell(_ cell: CallHistoryTableViewCell) {
135-
guard let remoteUserID = cell.remoteNicknameLabel.text else { return }
135+
let remoteUserID = cell.callHistory.remoteUserID
136136
let isVideoCall = cell.callHistory.hasVideo
137137
let dialParams = DialParams(calleeId: remoteUserID,
138138
isVideoCall: isVideoCall,

QuickStart/Settings/SettingsTableViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SettingsTableViewController: UITableViewController {
2222
}
2323
@IBOutlet weak var userIdLabel: UILabel! {
2424
didSet {
25-
self.userIdLabel.text = "User ID " + UserDefaults.standard.user.id
25+
self.userIdLabel.text = "User ID: " + UserDefaults.standard.user.id
2626
}
2727
}
2828

0 commit comments

Comments
 (0)