Commit 1acb2af8 authored by Alex朱枝文's avatar Alex朱枝文

解决图标显示异常,替换默认图标

parent d3c55158
......@@ -79,6 +79,7 @@
043671472D6C3ED100E8D9BA /* YHMembershipGrowthGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043671462D6C3ED100E8D9BA /* YHMembershipGrowthGuideView.swift */; };
043F0EB22DE85717003354EB /* YHTUIMessageListManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043F0EB12DE85717003354EB /* YHTUIMessageListManager.swift */; };
043F0EB32DE85717003354EB /* YHTencentDeskManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043F0EB02DE85717003354EB /* YHTencentDeskManager.swift */; };
043F0EB52DF85BC5003354EB /* TUICoreCustomTheme.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 043F0EB42DF85BC5003354EB /* TUICoreCustomTheme.bundle */; };
045647572D7976880001D831 /* YHHKVisaRenewalApplicationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045647562D7976880001D831 /* YHHKVisaRenewalApplicationVC.swift */; };
045647592D79877E0001D831 /* YHHKVisaRenewalApplicationHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045647582D79877E0001D831 /* YHHKVisaRenewalApplicationHeader.swift */; };
045C0F7F2D12CA5F00BD2DC0 /* submit_page_scroll.gif in Resources */ = {isa = PBXBuildFile; fileRef = 045C0F4F2D12CA5E00BD2DC0 /* submit_page_scroll.gif */; };
......@@ -1389,6 +1390,7 @@
043671462D6C3ED100E8D9BA /* YHMembershipGrowthGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMembershipGrowthGuideView.swift; sourceTree = "<group>"; };
043F0EB02DE85717003354EB /* YHTencentDeskManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTencentDeskManager.swift; sourceTree = "<group>"; };
043F0EB12DE85717003354EB /* YHTUIMessageListManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTUIMessageListManager.swift; sourceTree = "<group>"; };
043F0EB42DF85BC5003354EB /* TUICoreCustomTheme.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TUICoreCustomTheme.bundle; sourceTree = "<group>"; };
045647562D7976880001D831 /* YHHKVisaRenewalApplicationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalApplicationVC.swift; sourceTree = "<group>"; };
045647582D79877E0001D831 /* YHHKVisaRenewalApplicationHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalApplicationHeader.swift; sourceTree = "<group>"; };
045C0A142D12CA5E00BD2DC0 /* YHBaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewController.swift; sourceTree = "<group>"; };
......@@ -6360,6 +6362,7 @@
045C0F772D12CA5E00BD2DC0 /* Res */ = {
isa = PBXGroup;
children = (
043F0EB42DF85BC5003354EB /* TUICoreCustomTheme.bundle */,
04FE44D32DDC766D009BB247 /* TUIChatCustomTheme.bundle */,
045C0F4C2D12CA5E00BD2DC0 /* Font */,
045C0F502D12CA5E00BD2DC0 /* gif */,
......@@ -7074,6 +7077,7 @@
045C0F982D12CA5F00BD2DC0 /* AlibabaPuHuiTi-Bold.ttf in Resources */,
045C0F992D12CA5F00BD2DC0 /* AlimamaShuHeiTi-Bold.ttf in Resources */,
045C0F9A2D12CA5F00BD2DC0 /* shouye.json in Resources */,
043F0EB52DF85BC5003354EB /* TUICoreCustomTheme.bundle in Resources */,
045C0F9B2D12CA5F00BD2DC0 /* tab_ai.json in Resources */,
045C0F9C2D12CA5F00BD2DC0 /* shipin.json in Resources */,
045C0F9D2D12CA5F00BD2DC0 /* Launch Screen.storyboard in Resources */,
......
......@@ -435,5 +435,13 @@ extension AppDelegate {
TUIThemeManager.share().registerThemeResourcePath(customChatThemePath, for: .chat)
// 应用主题,根据 themeID 对 TUIChat 设置主题
TUIThemeManager.share().applyTheme("enterprise", for: .chat)
// 自定义修改 TUICore 组件的主题 - 在主题资源包中新增了一套主题
guard let customCoreThemePath = Bundle.main.path(forResource: "TUICoreCustomTheme", ofType: "bundle") else {
return
}
TUIThemeManager.share().registerThemeResourcePath(customCoreThemePath, for: .core)
// 应用主题,根据 themeID 对 TUICore 设置主题
TUIThemeManager.share().applyTheme("enterprise", for: .core)
}
}
......@@ -134,7 +134,7 @@ class YHMessageListVC: YHBaseViewController {
// 银河管家 始终放在第一位
if YHButlerServiceManager.shared.isUatAllowed() {
msgArr.insert(self.managerSession, at: 0)
msgArr.append(self.managerSession)
}
self.tableView.reloadData()
......@@ -247,15 +247,11 @@ class YHMessageListVC: YHBaseViewController {
self.managerSession.lastMessage = lastMsg.content
self.managerSession.lastMessageTime = Int64(lastMsg.timeStamp)
}
msgArr.insert(self.managerSession, at: 0)
msgArr.append(self.managerSession)
}
// 银河资讯
if msgArr.count > 0 {
msgArr.insert(self.viewModel.msgList.article, at: 1)
} else {
msgArr.insert(self.viewModel.msgList.article, at: 0)
}
msgArr.append(self.viewModel.msgList.article)
if success {
var hasUnreadMsg = false
......@@ -714,13 +710,7 @@ extension YHMessageListVC: YHMessageListDelegate {
}
msgArr.removeAll(where: { $0.type == YHMessageType.txIM.rawValue })
convertedItems.sort { $0.lastMessageTime > $1.lastMessageTime }
if msgArr.count > 1 {
msgArr.insert(contentsOf: convertedItems, at: 2)
} else if msgArr.count > 0 {
msgArr.insert(contentsOf: convertedItems, at: 1)
} else {
msgArr.insert(contentsOf: convertedItems, at: 0)
}
msgArr.insert(contentsOf: convertedItems, at: 0)
tableView.reloadData()
}
......
......@@ -21,6 +21,7 @@ class YHMessageSessionCell: UITableViewCell {
var detailLabel: UILabel!
var timeLabel: UILabel!
var bottomLineView: UIView!
private var currentGroupId: String?
required init?(coder: NSCoder) {
super.init(coder: coder)
......@@ -135,6 +136,7 @@ class YHMessageSessionCell: UITableViewCell {
private func updatePortrait(convData: YHMessageInfoModel) {
if !convData.groupID.isEmpty {
currentGroupId = convData.groupID
// Group avatar
if !convData.avatar.isEmpty {
// Group avatar has been manually set externally
......@@ -147,7 +149,7 @@ class YHMessageSessionCell: UITableViewCell {
TUIGroupAvatar.getCacheGroupAvatar(convData.groupID) { [weak self] (avatar, callbackGroupID) in
guard let self = self else { return }
if callbackGroupID == convData.groupID {
if callbackGroupID == self.currentGroupId {
if let avatar = avatar {
// Cache hit
self.iconImgView.image = avatar
......@@ -158,7 +160,7 @@ class YHMessageSessionCell: UITableViewCell {
TUIGroupAvatar.fetchGroupAvatars(convData.groupID, placeholder: placeholderImage) { [weak self] (success, image, fetchGroupID) in
guard let self = self else { return }
if fetchGroupID == convData.groupID {
if fetchGroupID == self.currentGroupId {
let placeholder = success ? image : TUIConfig.default().getGroupAvatarImage(byGroupType: convData.groupType)
self.iconImgView.image = placeholder
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>id</key>
<string>enterprise</string>
<key>name</key>
<string>企业</string>
<key>name_en</key>
<string>Enterprise</string>
<key>primary_color</key>
<string>#FFFFFF</string>
<key>primary_bg_color</key>
<string>#F2F3F5</string>
<key>primary_theme_color</key>
<string>#147AFF</string>
<key>common_switch_on_color</key>
<string>#34C759</string>
<key>head_bg_gradient_start_color</key>
<string>#EBF0F6</string>
<key>head_bg_gradient_end_color</key>
<string>#EBF0F6</string>
<key>default_group_head_public_img</key>
<string>default_group_head_public.png</string>
<key>default_group_head_meeting_img</key>
<string>default_group_head_meeting.png</string>
<key>default_group_head_avchatroom_img</key>
<string>default_group_head_avchatroom.png</string>
<key>default_group_head_community_img</key>
<string>default_group_head_community.png</string>
<key>default_group_head_img</key>
<string>default_group_head.png</string>
<key>default_c2c_head_img</key>
<string>default_c2c_head.png</string>
<key>search_textfield_bg_color</key>
<string>#FEFEFE</string>
<key>service_more_video_call_img</key>
<string>service_more_video_call.png</string>
<key>service_more_voice_call_img</key>
<string>service_more_voice_call.png</string>
<key>nav_back_img</key>
<string>nav_back.png</string>
</dict>
</plist>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment