Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Simple-Sms
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangchengbo
Simple-Sms
Commits
c37ab652
Commit
c37ab652
authored
May 16, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:手机号码更换为名称显示
parent
5f343c90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
MainActivity.kt
...c/main/kotlin/com/secspace/sms/activities/MainActivity.kt
+1
-1
ThreadActivity.kt
...main/kotlin/com/secspace/sms/activities/ThreadActivity.kt
+4
-1
BaseConversationsAdapter.kt
...lin/com/secspace/sms/adapters/BaseConversationsAdapter.kt
+3
-3
No files found.
app/src/main/kotlin/com/secspace/sms/activities/MainActivity.kt
View file @
c37ab652
...
...
@@ -529,7 +529,7 @@ class MainActivity : SimpleActivity() {
Intent
(
this
,
ThreadActivity
::
class
.
java
).
apply
{
val
conversation
=
any
as
Conversation
putExtra
(
THREAD_ID
,
conversation
.
threadId
)
putExtra
(
THREAD_TITLE
,
conversation
.
phoneNumber
)
putExtra
(
THREAD_TITLE
,
conversation
.
title
)
putExtra
(
WAS_PROTECTION_HANDLED
,
wasProtectionHandled
)
startActivity
(
this
)
}
...
...
app/src/main/kotlin/com/secspace/sms/activities/ThreadActivity.kt
View file @
c37ab652
...
...
@@ -138,6 +138,7 @@ class ThreadActivity : SimpleActivity() {
threadId
=
intent
.
getLongExtra
(
THREAD_ID
,
0L
)
intent
.
getStringExtra
(
THREAD_TITLE
)
?.
let
{
binding
.
threadToolbar
.
title
=
it
android
.
util
.
Log
.
d
(
"shuju"
,
"ThreadActivity OnCreate title = $it"
)
}
isRecycleBin
=
intent
.
getBooleanExtra
(
IS_RECYCLE_BIN
,
false
)
wasProtectionHandled
=
intent
.
getBooleanExtra
(
WAS_PROTECTION_HANDLED
,
false
)
...
...
@@ -425,9 +426,11 @@ class ThreadActivity : SimpleActivity() {
}
private
fun
setupThreadTitle
()
{
val
title
=
conversation
?.
phoneNumber
Log
.
d
(
"shuju"
,
"--ThreadActivity--setupThreadTitle-- conversation:${Gson().toJson(conversation)}"
)
val
title
=
conversation
?.
title
binding
.
threadToolbar
.
title
=
if
(!
title
.
isNullOrEmpty
())
{
Log
.
d
(
"shuju"
,
"--ThreadActivity--setupThreadTitle---1 THREAD_NUMBER:$title"
)
// "$title ${conversation?.phoneNumber}"
title
}
else
{
Log
.
d
(
"shuju"
,
"--ThreadActivity--setupThreadTitle---2 THREAD_NUMBER:${intent.getStringExtra(THREAD_NUMBER)}"
)
...
...
app/src/main/kotlin/com/secspace/sms/adapters/BaseConversationsAdapter.kt
View file @
c37ab652
...
...
@@ -2,6 +2,7 @@ package com.secspace.sms.adapters
import
android.graphics.Typeface
import
android.os.Parcelable
import
android.util.Log
import
android.util.TypedValue
import
android.view.View
import
android.view.ViewGroup
...
...
@@ -124,9 +125,8 @@ abstract class BaseConversationsAdapter(
conversationFrame
.
isSelected
=
selectedKeys
.
contains
(
conversation
.
hashCode
())
conversationAddress
.
apply
{
// text = conversation.title
text
=
conversation
.
phoneNumber
// Log.e("shuju", "----BaseAdapter----conversationAddress:${conversation.phoneNumber}")
text
=
conversation
.
title
Log
.
e
(
"shuju"
,
"----BaseAdapter----conversationAddress:${conversation.title} name = $${conversation.phoneNumber}"
)
setTextSize
(
TypedValue
.
COMPLEX_UNIT_PX
,
fontSize
*
1.2f
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment