Commit 62fe8fe0 by zhangchengbo

fix:解决[通讯录]长按手机号系统弹出发送短信无法跳转问题

parent 9a26ec88
......@@ -7,6 +7,7 @@ import android.view.WindowManager
import android.widget.Toast
import com.google.gson.Gson
import com.reddit.indicatorfastscroll.FastScrollItemIndicator
import com.secspace.log.Log
import com.secspace.sms.R
import com.secspace.sms.adapters.ContactsAdapter
import com.secspace.sms.databinding.ActivityNewConversationBinding
......@@ -266,7 +267,7 @@ class NewConversationActivity : SimpleActivity() {
val number = if (numbers.size == 1) phoneNumber else Gson().toJson(numbers)
// val nameResult: NamePhoto = getNameAndPhotoFromPhoneNumber(phoneNumber)
// Log.d(TAG, "NewConversationActivity--phoneNumber:$phoneNumber threadId:${getThreadId(numbers)} numbers:${numbers} text:$text name = $name nameResult = $nameResult")
// Log.d(TAG, "NewConversationActivity--phoneNumber:$phoneNumber threadId:${getThreadId(numbers)} numbers:${numbers} text:$text name = $name ")
Intent(this, ThreadActivity::class.java).apply {
putExtra(THREAD_ID, getThreadId(numbers))
......@@ -274,7 +275,7 @@ class NewConversationActivity : SimpleActivity() {
putExtra(THREAD_TITLE, name)
} else {
val threadTitle = intent.getStringExtra(THREAD_TITLE)
// android.util.Log.d(TAG, "NewConversationActivity threadTitle = $threadTitle numbers = $numbers number = ${number} name = $name")
// android.util.Log.d(TAG, "NewConversationActivity threadTitle = $threadTitle ")
if(!threadTitle.isNullOrEmpty()){
putExtra(THREAD_TITLE, threadTitle)
}
......
......@@ -139,7 +139,7 @@ class ThreadActivity : SimpleActivity() {
threadId = intent.getLongExtra(THREAD_ID, 0L)
intent.getStringExtra(THREAD_TITLE)?.let {
binding.threadToolbar.title = it
// android.util.Log.d(TAG, " OnCreate title = $it")
android.util.Log.d(TAG, " OnCreate title = $it")
}
isRecycleBin = intent.getBooleanExtra(IS_RECYCLE_BIN, false)
wasProtectionHandled = intent.getBooleanExtra(WAS_PROTECTION_HANDLED, false)
......@@ -429,7 +429,7 @@ class ThreadActivity : SimpleActivity() {
private fun setupThreadTitle() {
// Log.d(TAG,"--ThreadActivity--setupThreadTitle-- conversation:${Gson().toJson(conversation)} binding.threadToolbar.title = ${binding.threadToolbar.title}")
if(binding.threadToolbar.title.isNotEmpty()) return
// if(binding.threadToolbar.title.isNotEmpty()) return
val title = conversation?.title
......@@ -438,7 +438,7 @@ class ThreadActivity : SimpleActivity() {
// "$title ${conversation?.phoneNumber}"
title
} else {
val title = intent.getStringExtra(THREAD_TITLE)
val title = intent.getStringExtra(THREAD_TITLE)?: ""
if(!title.isNullOrEmpty()){
binding.threadToolbar.title = title
return
......
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