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
15c56e83
Commit
15c56e83
authored
Nov 18, 2024
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:删除最近联系人列表展示
parent
aa5d4754
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
NewConversationActivity.kt
...in/com/secspace/sms/activities/NewConversationActivity.kt
+21
-2
activity_new_conversation.xml
app/src/main/res/layout/activity_new_conversation.xml
+2
-0
No files found.
app/src/main/kotlin/com/secspace/sms/activities/NewConversationActivity.kt
View file @
15c56e83
...
@@ -122,7 +122,25 @@ class NewConversationActivity : SimpleActivity() {
...
@@ -122,7 +122,25 @@ class NewConversationActivity : SimpleActivity() {
}
}
private
fun
fetchContacts
()
{
private
fun
fetchContacts
()
{
fillSuggestedContacts
{
/*fillSuggestedContacts {
SimpleContactsHelper(this).getAvailableContacts(false) {
allContacts = it
if (privateContacts.isNotEmpty()) {
allContacts.addAll(privateContacts)
allContacts.sort()
}
runOnUiThread {
setupAdapter(allContacts)
}
}
}*/
ensureBackgroundThread
{
val
privateCursor
=
getMyContactsCursor
(
favoritesOnly
=
false
,
withPhoneNumbersOnly
=
true
)
privateContacts
=
MyContactsContentProvider
.
getSimpleContacts
(
this
,
privateCursor
)
SimpleContactsHelper
(
this
).
getAvailableContacts
(
false
)
{
SimpleContactsHelper
(
this
).
getAvailableContacts
(
false
)
{
allContacts
=
it
allContacts
=
it
...
@@ -136,6 +154,7 @@ class NewConversationActivity : SimpleActivity() {
...
@@ -136,6 +154,7 @@ class NewConversationActivity : SimpleActivity() {
}
}
}
}
}
}
}
}
private
fun
setupAdapter
(
contacts
:
ArrayList
<
SimpleContact
>)
{
private
fun
setupAdapter
(
contacts
:
ArrayList
<
SimpleContact
>)
{
...
@@ -196,7 +215,7 @@ class NewConversationActivity : SimpleActivity() {
...
@@ -196,7 +215,7 @@ class NewConversationActivity : SimpleActivity() {
val
privateCursor
=
getMyContactsCursor
(
favoritesOnly
=
false
,
withPhoneNumbersOnly
=
true
)
val
privateCursor
=
getMyContactsCursor
(
favoritesOnly
=
false
,
withPhoneNumbersOnly
=
true
)
ensureBackgroundThread
{
ensureBackgroundThread
{
privateContacts
=
MyContactsContentProvider
.
getSimpleContacts
(
this
,
privateCursor
)
privateContacts
=
MyContactsContentProvider
.
getSimpleContacts
(
this
,
privateCursor
)
val
suggestions
=
getSuggestedContacts
(
privateContacts
)
val
suggestions
:
java
.
util
.
ArrayList
<
SimpleContact
>
=
getSuggestedContacts
(
privateContacts
)
runOnUiThread
{
runOnUiThread
{
binding
.
suggestionsHolder
.
removeAllViews
()
binding
.
suggestionsHolder
.
removeAllViews
()
if
(
suggestions
.
isEmpty
())
{
if
(
suggestions
.
isEmpty
())
{
...
...
app/src/main/res/layout/activity_new_conversation.xml
View file @
15c56e83
...
@@ -84,6 +84,7 @@
...
@@ -84,6 +84,7 @@
android:id=
"@+id/suggestions_label"
android:id=
"@+id/suggestions_label"
style=
"@style/MaterialSectionLabelStyle"
style=
"@style/MaterialSectionLabelStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:visibility=
"gone"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/add_contact_divider"
android:layout_below=
"@+id/add_contact_divider"
android:layout_marginStart=
"@dimen/activity_margin"
android:layout_marginStart=
"@dimen/activity_margin"
...
@@ -95,6 +96,7 @@
...
@@ -95,6 +96,7 @@
android:id=
"@+id/suggestions_scrollview"
android:id=
"@+id/suggestions_scrollview"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
android:layout_below=
"@+id/suggestions_label"
android:layout_below=
"@+id/suggestions_label"
android:layout_marginBottom=
"@dimen/medium_margin"
android:layout_marginBottom=
"@dimen/medium_margin"
android:overScrollMode=
"never"
android:overScrollMode=
"never"
...
...
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