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
8dfb15fc
Commit
8dfb15fc
authored
Jul 31, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:根据[顺丰小哥]App发送短信固定模版检索关键词进行脱敏操作
parent
44530774
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
BaseConversationsAdapter.kt
...lin/com/secspace/sms/adapters/BaseConversationsAdapter.kt
+20
-6
No files found.
app/src/main/kotlin/com/secspace/sms/adapters/BaseConversationsAdapter.kt
View file @
8dfb15fc
...
...
@@ -15,6 +15,7 @@ import com.secspace.sms.databinding.ItemConversationBinding
import
com.secspace.sms.extensions.config
import
com.secspace.sms.extensions.getAllDrafts
import
com.secspace.sms.models.Conversation
import
com.secspace.sms.util.PhoneUtils
import
com.simplemobiletools.commons.adapters.MyRecyclerViewListAdapter
import
com.simplemobiletools.commons.extensions.*
import
com.simplemobiletools.commons.helpers.SimpleContactsHelper
...
...
@@ -112,6 +113,10 @@ abstract class BaseConversationsAdapter(
}
}
fun
containsDigit
(
str
:
String
):
Boolean
{
return
str
.
matches
(
".*\\d+.*"
.
toRegex
())
}
private
fun
setupView
(
view
:
View
,
conversation
:
Conversation
)
{
ItemConversationBinding
.
bind
(
view
).
apply
{
root
.
setupViewBackground
(
activity
)
...
...
@@ -125,15 +130,24 @@ abstract class BaseConversationsAdapter(
conversationFrame
.
isSelected
=
selectedKeys
.
contains
(
conversation
.
hashCode
())
conversationAddress
.
apply
{
/*if(conversationBodyShort.conversation.snippet){
}*/
text
=
if
(
conversation
.
phoneNumber
.
contains
(
"**"
)){
text
=
if
(
conversation
.
phoneNumber
.
contains
(
"**"
))
{
conversation
.
phoneNumber
}
else
{
}
else
{
conversation
.
title
}
Log
.
e
(
"MainActivity"
,
"----BaseAdapter----conversationAddress:${conversation.title} name = ${conversation.phoneNumber}"
)
if
(
conversation
.
snippet
.
isNotEmpty
()
&&
conversation
.
title
.
length
>=
11
)
{
if
(
conversation
.
snippet
.
contains
(
"快递单号"
)
&&
conversation
.
snippet
.
contains
(
"SF"
)
&&
containsDigit
(
conversation
.
snippet
))
{
val
phoneNumber
=
conversation
.
title
if
(
phoneNumber
.
contains
(
"+86"
))
{
phoneNumber
.
replace
(
"+86"
,
""
)
}
// Log.e("MainActivity", "----BaseAdapter----phoneNumber:$phoneNumber")
PhoneUtils
.
phoneNumberFormat
(
phoneNumber
)
{
itNumber
->
text
=
itNumber
}
}
}
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