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
d585fd1d
Commit
d585fd1d
authored
Dec 12, 2024
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:去除集合长度判断,修复没会话UI界面显示开始对话Text
parent
60bc5c42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
MainActivity.kt
...c/main/kotlin/com/secspace/sms/activities/MainActivity.kt
+2
-3
No files found.
app/src/main/kotlin/com/secspace/sms/activities/MainActivity.kt
View file @
d585fd1d
...
@@ -413,7 +413,7 @@ class MainActivity : SimpleActivity() {
...
@@ -413,7 +413,7 @@ class MainActivity : SimpleActivity() {
// Log.e(TAG, " getNewConversations privateContacts:${GsonUtil.parseListToJson(privateContacts)}")
// Log.e(TAG, " getNewConversations privateContacts:${GsonUtil.parseListToJson(privateContacts)}")
//获取系统SMS DB短信列表
//获取系统SMS DB短信列表
val
conversations
:
java
.
util
.
ArrayList
<
Conversation
>
=
getConversations
(
privateContacts
=
privateContacts
)
val
conversations
:
java
.
util
.
ArrayList
<
Conversation
>
=
getConversations
(
privateContacts
=
privateContacts
)
//
Log.e(TAG, " getNewConversations 获取系统SMS DB短信列表(脏数据) conversations:${GsonUtil.parseListToJson(conversations)}")
Log
.
e
(
TAG
,
" getNewConversations 获取系统SMS DB短信列表(脏数据) conversations:${GsonUtil.parseListToJson(conversations)}"
)
//通过DB数据与cache对比threadID
//通过DB数据与cache对比threadID
conversations
.
forEach
{
clonedConversation
->
conversations
.
forEach
{
clonedConversation
->
...
@@ -503,7 +503,7 @@ class MainActivity : SimpleActivity() {
...
@@ -503,7 +503,7 @@ class MainActivity : SimpleActivity() {
*/
*/
private
fun
setFirstConversationAndUpdateData
(
sortedConversations
:
ArrayList
<
Conversation
>)
{
private
fun
setFirstConversationAndUpdateData
(
sortedConversations
:
ArrayList
<
Conversation
>)
{
val
hasPerMissionResult
=
this
@MainActivity
.
hasPermission
(
PERMISSION_READ_CALL_LOG
)
val
hasPerMissionResult
=
this
@MainActivity
.
hasPermission
(
PERMISSION_READ_CALL_LOG
)
if
(
hasPerMissionResult
)
{
if
(
hasPerMissionResult
&&
sortedConversations
.
isNotEmpty
()
)
{
val
firstConversation
=
sortedConversations
.
first
()
//获取第一条未掩码会话
val
firstConversation
=
sortedConversations
.
first
()
//获取第一条未掩码会话
Log
.
d
(
TAG
,
" MainActivity firstConversation() 获取第一条会话 =: ${GsonUtil.parseBeanToJson(firstConversation)}"
)
Log
.
d
(
TAG
,
" MainActivity firstConversation() 获取第一条会话 =: ${GsonUtil.parseBeanToJson(firstConversation)}"
)
...
@@ -541,7 +541,6 @@ class MainActivity : SimpleActivity() {
...
@@ -541,7 +541,6 @@ class MainActivity : SimpleActivity() {
}
}
private
fun
setupConversations
(
conversations
:
ArrayList
<
Conversation
>,
cached
:
Boolean
=
false
)
{
private
fun
setupConversations
(
conversations
:
ArrayList
<
Conversation
>,
cached
:
Boolean
=
false
)
{
if
(
conversations
.
size
==
0
)
return
val
sortedConversations
=
conversations
.
sortedWith
(
val
sortedConversations
=
conversations
.
sortedWith
(
compareByDescending
<
Conversation
>
{
config
.
pinnedConversations
.
contains
(
it
.
threadId
.
toString
())
}
compareByDescending
<
Conversation
>
{
config
.
pinnedConversations
.
contains
(
it
.
threadId
.
toString
())
}
...
...
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