Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
xabber-android
Commits
87581069
Commit
87581069
authored
Jun 30, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contact list: active chat with empty message looks almost like usual contact.
parent
e2161dda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
ContactItemInflater.java
...va/com/xabber/android/ui/adapter/ContactItemInflater.java
+21
-14
No files found.
app/src/main/java/com/xabber/android/ui/adapter/ContactItemInflater.java
View file @
87581069
...
...
@@ -80,31 +80,38 @@ public class ContactItemInflater {
MessageManager
messageManager
=
MessageManager
.
getInstance
();
viewHolder
.
smallRightText
.
setVisibility
(
View
.
GONE
);
viewHolder
.
smallRightIcon
.
setVisibility
(
View
.
GONE
);
if
(
messageManager
.
hasActiveChat
(
contact
.
getAccount
(),
contact
.
getUser
()))
{
AbstractChat
chat
=
messageManager
.
getChat
(
contact
.
getAccount
(),
contact
.
getUser
());
statusText
=
chat
.
getLastText
().
trim
();
view
.
setBackgroundColor
(
context
.
getResources
().
getColor
(
R
.
color
.
contact_list_active_chat_background
));
if
(!
statusText
.
isEmpty
())
{
viewHolder
.
smallRightText
.
setText
(
StringUtils
.
getSmartTimeText
(
context
,
chat
.
getLastTime
()));
viewHolder
.
smallRightText
.
setVisibility
(
View
.
VISIBLE
);
if
(!
statusText
.
isEmpty
()
&&
!
chat
.
isLastMessageIncoming
())
{
if
(
!
chat
.
isLastMessageIncoming
())
{
viewHolder
.
outgoingMessageIndicator
.
setText
(
context
.
getString
(
R
.
string
.
sender_is_you
)
+
": "
);
viewHolder
.
outgoingMessageIndicator
.
setVisibility
(
View
.
VISIBLE
);
viewHolder
.
outgoingMessageIndicator
.
setTextColor
(
accountMainColors
[
colorLevel
]);
}
view
.
setBackgroundColor
(
context
.
getResources
().
getColor
(
R
.
color
.
contact_list_active_chat_background
));
viewHolder
.
smallRightIcon
.
setImageResource
(
R
.
drawable
.
ic_client_small
);
viewHolder
.
smallRightIcon
.
setVisibility
(
View
.
VISIBLE
);
viewHolder
.
smallRightIcon
.
setImageLevel
(
clientSoftware
.
ordinal
());
viewHolder
.
largeClientIcon
.
setVisibility
(
View
.
GONE
);
}
else
{
viewHolder
.
largeClientIcon
.
setVisibility
(
View
.
VISIBLE
);
viewHolder
.
largeClientIcon
.
setImageLevel
(
clientSoftware
.
ordinal
());
}
}
else
{
statusText
=
contact
.
getStatusText
().
trim
();
viewHolder
.
smallRightText
.
setVisibility
(
View
.
GONE
);
view
.
setBackgroundColor
(
context
.
getResources
().
getColor
(
R
.
color
.
contact_list_contact_background
));
viewHolder
.
smallRightIcon
.
setVisibility
(
View
.
GONE
);
viewHolder
.
largeClientIcon
.
setVisibility
(
View
.
VISIBLE
);
viewHolder
.
largeClientIcon
.
setImageLevel
(
clientSoftware
.
ordinal
());
}
...
...
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