|
|
@@ -66,28 +66,28 @@ class ConversationTargetInfoComp(
|
|
|
}
|
|
|
|
|
|
private fun observerViewModels() {
|
|
|
- if (callback.getTargetId() == OFFICIAL_TARGET_ID) {
|
|
|
- //官号,只展示昵称 + 官方号图标
|
|
|
- binding.nameTv.show()
|
|
|
- binding.officialTargetIv.show()
|
|
|
- binding.officialLabelTv.gone()
|
|
|
- binding.intimacyCl.gone()
|
|
|
- binding.customerServiceTv.gone()
|
|
|
- binding.nameTv.text = getCompatString(R.string.message_official_entry)
|
|
|
- return
|
|
|
- }
|
|
|
- if (isSystemTarget(callback.getTargetId())) {
|
|
|
- //兼容后续官号,目前只展示空昵称
|
|
|
- binding.nameTv.show()
|
|
|
- binding.officialTargetIv.gone()
|
|
|
- binding.officialLabelTv.gone()
|
|
|
- binding.intimacyCl.gone()
|
|
|
- binding.customerServiceTv.gone()
|
|
|
- binding.nameTv.text = ""
|
|
|
- return
|
|
|
- }
|
|
|
messageViewModel.chatPageDetailResLD.observeWithoutCache(viewLifecycleOwner) {
|
|
|
it.onSuccess { data ->
|
|
|
+ if (callback.getTargetId() == OFFICIAL_TARGET_ID) {
|
|
|
+ //官号,只展示昵称 + 官方号图标
|
|
|
+ binding.nameTv.show()
|
|
|
+ binding.officialTargetIv.show()
|
|
|
+ binding.officialLabelTv.gone()
|
|
|
+ binding.intimacyCl.gone()
|
|
|
+ binding.customerServiceTv.gone()
|
|
|
+ binding.nameTv.text = getCompatString(R.string.message_official_entry)
|
|
|
+ return@observeWithoutCache
|
|
|
+ }
|
|
|
+ if (isSystemTarget(callback.getTargetId())) {
|
|
|
+ //兼容后续官号,目前只展示空昵称
|
|
|
+ binding.nameTv.show()
|
|
|
+ binding.officialTargetIv.gone()
|
|
|
+ binding.officialLabelTv.gone()
|
|
|
+ binding.intimacyCl.gone()
|
|
|
+ binding.customerServiceTv.gone()
|
|
|
+ binding.nameTv.text = ""
|
|
|
+ return@observeWithoutCache
|
|
|
+ }
|
|
|
viewLifecycleOwner.lifecycleScope.launch {
|
|
|
val isCustomerService = messageManager.checkIsCustomerService(callback.getTargetId(), true)
|
|
|
if (isCustomerService) {
|
|
|
@@ -271,7 +271,6 @@ class ConversationTargetInfoComp(
|
|
|
|
|
|
override fun onNewIntent(intent: Intent?) {
|
|
|
super.onNewIntent(intent)
|
|
|
- observerViewModels()
|
|
|
inProgressUpgradeLevelSet.clear()
|
|
|
}
|
|
|
|