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
f91f1fa8
Commit
f91f1fa8
authored
Aug 28, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:解决当通话记录与短信列表都无该手机号记录(新短信),记录该手机号,跳转详情时title展示
parent
064b8d3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
+19
-11
MainActivity.kt
...c/main/kotlin/com/secspace/sms/activities/MainActivity.kt
+13
-8
SmsReceiver.kt
...src/main/kotlin/com/secspace/sms/receivers/SmsReceiver.kt
+6
-3
No files found.
app/src/main/kotlin/com/secspace/sms/activities/MainActivity.kt
View file @
f91f1fa8
...
...
@@ -399,7 +399,7 @@ class MainActivity : SimpleActivity() {
}
val
allConversations
=
conversationsDB
.
getNonArchived
()
as
ArrayList
<
Conversation
>
//
Log.d(TAG, "getNewConversations allConversations = ${GsonUtil.parseListToJson(allConversations)} ")
Log
.
d
(
TAG
,
"getNewConversations allConversations = ${GsonUtil.parseListToJson(allConversations)} "
)
setupConversations
(
allConversations
)
//未读消息 桌面Icon提示
...
...
@@ -583,13 +583,18 @@ class MainActivity : SimpleActivity() {
private
fun
handleConversationClick
(
any
:
Any
)
{
Intent
(
this
,
ThreadActivity
::
class
.
java
).
apply
{
val
conversation
=
any
as
Conversation
if
(
conversation
.
snippet
.
contains
(
"\u200B"
)
||
conversation
.
isSFNumber
)
{
val
phoneNumber
=
conversation
.
title
if
(
phoneNumber
.
contains
(
"+86"
))
{
phoneNumber
.
replace
(
"+86"
,
""
)
}
PhoneUtils
.
phoneNumberFormat
(
phoneNumber
)
{
itNumber
->
putExtra
(
THREAD_TITLE
,
itNumber
)
// android.util.Log.d(TAG, "handleConversationClick: snippet = ${conversation.snippet}")
val
listMessageData
=
getMessages
(
conversation
.
threadId
,
false
)
if
(
listMessageData
.
isNotEmpty
())
{
val
listContains
:
List
<
Message
>
=
listMessageData
.
filter
{
msg
->
msg
.
body
.
contains
(
"\u200B"
)
}
if
(
listContains
.
isNotEmpty
()
||
conversation
.
isSFNumber
)
{
val
phoneNumber
=
conversation
.
title
if
(
phoneNumber
.
contains
(
"+86"
))
{
phoneNumber
.
replace
(
"+86"
,
""
)
}
PhoneUtils
.
phoneNumberFormat
(
phoneNumber
)
{
itNumber
->
putExtra
(
THREAD_TITLE
,
itNumber
)
}
}
}
else
{
putExtra
(
THREAD_TITLE
,
conversation
.
title
)
...
...
app/src/main/kotlin/com/secspace/sms/receivers/SmsReceiver.kt
View file @
f91f1fa8
...
...
@@ -8,7 +8,6 @@ import android.database.Cursor
import
android.os.Handler
import
android.os.Looper
import
android.provider.Telephony
//import com.android.sfsylibrary.CallHistoryManager
import
com.secspace.log.Log
import
com.secspace.sms.extensions.*
import
com.secspace.sms.helpers.Config
...
...
@@ -125,7 +124,11 @@ class SmsReceiver : BroadcastReceiver() {
}
}
}
confirmCallBack
.
invoke
(
lastNumber
)
if
(
lastNumber
==
""
)
{
confirmCallBack
.
invoke
(
phoneNumber
)
}
else
{
confirmCallBack
.
invoke
(
lastNumber
)
}
}
...
...
@@ -245,7 +248,7 @@ class SmsReceiver : BroadcastReceiver() {
val
tipPopup
=
MyPushWindow
(
context
,
itNumber
,
body
)
tipPopup
.
show
()
}
}
else
{
}
else
{
val
tipPopup
=
MyPushWindow
(
context
,
address
,
body
)
tipPopup
.
show
()
}
...
...
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