Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
b7f1998f
Commit
b7f1998f
authored
3 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
conversation selection: use ConversationFacade after injection
Change-Id: Ib3fae9950819e47a827d5be1aa3227d3a031bedb
parent
5134e394
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ring-android/app/src/main/java/cx/ring/client/ConversationSelectionActivity.kt
+14
-14
14 additions, 14 deletions
...main/java/cx/ring/client/ConversationSelectionActivity.kt
with
14 additions
and
14 deletions
ring-android/app/src/main/java/cx/ring/client/ConversationSelectionActivity.kt
+
14
−
14
View file @
b7f1998f
...
...
@@ -51,23 +51,24 @@ class ConversationSelectionActivity : AppCompatActivity() {
@Singleton
lateinit
var
mCallService
:
CallService
private
val
adapter
:
SmartListAdapter
=
SmartListAdapter
(
null
,
object
:
SmartListListeners
{
override
fun
onItemClick
(
item
:
Conversation
)
{
val
intent
=
Intent
()
intent
.
data
=
ConversationPath
.
toUri
(
item
.
accountId
,
item
.
uri
)
setResult
(
RESULT_OK
,
intent
)
finish
()
}
override
fun
onItemLongClick
(
item
:
Conversation
)
{}
},
mConversationFacade
,
mDisposable
)
var
adapter
:
SmartListAdapter
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
frag_selectconv
)
val
list
=
findViewById
<
RecyclerView
>(
R
.
id
.
conversationList
)
list
.
layoutManager
=
LinearLayoutManager
(
this
)
list
.
adapter
=
adapter
list
.
adapter
=
SmartListAdapter
(
null
,
object
:
SmartListListeners
{
override
fun
onItemClick
(
item
:
Conversation
)
{
setResult
(
RESULT_OK
,
Intent
().
apply
{
data
=
ConversationPath
.
toUri
(
item
.
accountId
,
item
.
uri
)
})
finish
()
}
override
fun
onItemLongClick
(
item
:
Conversation
)
{}
},
mConversationFacade
,
mDisposable
)
.
apply
{
adapter
=
this
}
JamiApplication
.
instance
?.
startDaemon
()
}
...
...
@@ -89,7 +90,7 @@ class ConversationSelectionActivity : AppCompatActivity() {
}
}
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
list
->
adapter
.
update
(
list
)
})
.
subscribe
{
list
->
adapter
?
.
update
(
list
)
})
}
public
override
fun
onStop
()
{
...
...
@@ -99,7 +100,6 @@ class ConversationSelectionActivity : AppCompatActivity() {
public
override
fun
onDestroy
()
{
super
.
onDestroy
()
findViewById
<
RecyclerView
>(
R
.
id
.
conversationList
).
adapter
=
null
adapter
.
update
(
ArrayList
())
adapter
=
null
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment