Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-android
Commits
a1fca572
Commit
a1fca572
authored
Sep 24, 2021
by
Amirhossein Naghshzan
Committed by
Adrien Béraud
Sep 24, 2021
Browse files
tv: update conversation adapter
Change-Id: I7bd0a6daad83277b7c0a537bfa93ec002e4376fc
parent
b7ff1de9
Changes
1
Hide whitespace changes
Inline
Side-by-side
ring-android/app/src/main/java/cx/ring/tv/conversation/TvConversationAdapter.kt
View file @
a1fca572
...
...
@@ -660,11 +660,14 @@ class TvConversationAdapter(
private
fun
configureForContactEvent
(
viewHolder
:
ConversationViewHolder
,
interaction
:
Interaction
)
{
val
event
=
interaction
as
ContactEvent
if
(
event
.
event
===
ContactEvent
.
Event
.
ADDED
)
{
viewHolder
.
mMsgTxt
?.
setText
(
R
.
string
.
hist_contact_added
)
}
else
if
(
event
.
event
===
ContactEvent
.
Event
.
INCOMING_REQUEST
)
{
viewHolder
.
mMsgTxt
?.
setText
(
R
.
string
.
hist_invitation_received
)
}
viewHolder
.
mMsgTxt
?.
setText
(
when
(
event
.
event
)
{
ContactEvent
.
Event
.
ADDED
->
R
.
string
.
hist_contact_added
ContactEvent
.
Event
.
INVITED
->
R
.
string
.
hist_contact_invited
ContactEvent
.
Event
.
REMOVED
->
R
.
string
.
hist_contact_left
ContactEvent
.
Event
.
BANNED
->
R
.
string
.
hist_contact_banned
ContactEvent
.
Event
.
INCOMING_REQUEST
->
R
.
string
.
hist_invitation_received
else
->
R
.
string
.
hist_contact_added
})
viewHolder
.
compositeDisposable
.
add
(
timestampUpdateTimer
.
subscribe
{
t
:
Long
?
->
val
timeSeparationString
=
TextUtils
.
timestampToDetailString
(
viewHolder
.
itemView
.
context
,
event
.
timestamp
)
viewHolder
.
mMsgDetailTxt
?.
text
=
timeSeparationString
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment