Skip to content

Commit be68373

Browse files
authored
Merge pull request #12 from zjc19891106/dev
Update README.md
2 parents fe4d495 + b3e7ae3 commit be68373

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ let AppKey: String = <#AppKey#>
154154
```
155155
- 将注册的AppKey填入其中。
156156
- 在终端cd到podfile所在的文件目录,复制代理到终端,执行`pod install`命令,等待成功后点击运行即可。
157-
- 将用户名以及token复制粘贴填写在输入框中->然后点击登录->选择呼叫类型->输入呼叫用户的userId->点击呼叫。
157+
- 将用户Id以及token复制粘贴填写在`PublicDefines.swift`中即可。注意需要安装两个设备两个用户登录测试
158158
- 若需发起群组通话,才需要[创建群组](https://v2-console.easemob.com/app/operation/management/micro/app/im-service/operative-service/group),将已创建用户加入群组见下图,让其中一两个用户登录后,将群组id复制到输入框中点击呼叫即可。
159159

160160
![](./DocumentationImages/joinGroup.png)

Sources/EaseCallUIKit/Classes/UI/Controllers/CallMultiViewController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,23 @@ open class CallMultiViewController: UIViewController {
7979
self.addCallTimer()
8080
}
8181
self.view.addSubViews([self.background, self.navigationBar,self.bottomView,self.callView])
82-
// if let call = CallKitManager.shared.callInfo, (call.state == .answering || call.state == .dialing) {
83-
// self.callView.updateWithItems()
84-
// }
8582
self.bottomView.updateButtonSelectedStatus(selectedIndex: 3)
8683
self.callView.isHidden = !state
8784
// Do any additional setup after loading the view.
8885
self.setupNavigationState()
8986
if let groupId = CallKitManager.shared.callInfo?.groupId, !groupId.isEmpty {
9087
let groupName = CallKitManager.shared.callInfo?.groupName ?? groupId
88+
var avatarURL = CallKitManager.shared.callInfo?.groupAvatar ?? ""
9189
var showName = groupName
9290
if let chatGroup = ChatGroup(id: groupId) {
9391
if !chatGroup.groupName.isEmpty {
9492
showName = chatGroup.groupName
95-
let avatarURL = CallKitManager.shared.callInfo?.groupAvatar ?? chatGroup.groupAvatar
96-
self.navigationBar.avatarURL = avatarURL
93+
if avatarURL.isEmpty {
94+
avatarURL = chatGroup.groupAvatar
95+
}
9796
}
9897
}
98+
self.navigationBar.avatarURL = avatarURL
9999
self.navigationBar.title = showName
100100
}
101101
self.navigationBar.clickClosure = { [weak self] in

Sources/EaseCallUIKit/Classes/UI/Controllers/MultiCallParticipantsController.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ import UIKit
7878
Task {
7979
let profiles = await CallKitManager.shared.profileProvider?.fetchGroupProfiles(profileIds: [groupId])
8080
if let profile = profiles?.first {
81-
if let group = ChatGroup(id: self.groupId) {
81+
self.groupName = profile.nickname
82+
self.groupAvatar = profile.avatarURL
83+
if let group = ChatGroup(id: self.groupId),self.groupName.isEmpty,self.groupAvatar.isEmpty {
8284
self.groupName = profile.nickname
8385
self.groupAvatar = profile.avatarURL
8486
}
@@ -89,7 +91,9 @@ import UIKit
8991
CallKitManager.shared.profileProviderOC?.fetchGroupProfiles(profileIds: [groupId]) { [weak self] profiles in
9092
guard let `self` = self else { return }
9193
if let profile = profiles.first {
92-
if let group = ChatGroup(id: self.groupId) {
94+
self.groupName = profile.nickname
95+
self.groupAvatar = profile.avatarURL
96+
if let group = ChatGroup(id: self.groupId),self.groupName.isEmpty,self.groupAvatar.isEmpty {
9397
self.groupName = profile.nickname
9498
self.groupAvatar = profile.avatarURL
9599
}

0 commit comments

Comments
 (0)