diff options
author | iNPUTmice <daniel@gultsch.de> | 2015-04-13 15:59:18 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2015-04-13 15:59:18 +0200 |
commit | 845b39cdcc4d20d916bdee5b661c31a19f6cbdac (patch) | |
tree | d8b2eb918c278134d9879d4b79fe6aa95801090b /src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java | |
parent | 37d08276a866aa943bfb6022732618e9fc37653b (diff) |
fixed regression where the selected conversation wasn't highlighted anymore on tabled layout
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java index a48f6ae43..d5b7e4c05 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -46,17 +46,10 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { } Conversation conversation = getItem(position); if (this.activity instanceof ConversationActivity) { - ConversationActivity activity = (ConversationActivity) this.activity; - if (!activity.isConversationsOverviewHideable()) { - if (conversation == activity.getSelectedConversation()) { - view.setBackgroundColor(activity - .getSecondaryBackgroundColor()); - } else { - view.setBackgroundColor(Color.TRANSPARENT); - } - } else { - view.setBackgroundColor(Color.TRANSPARENT); - } + View swipeableItem = view.findViewById(R.id.swipeable_item); + ConversationActivity a = (ConversationActivity) this.activity; + int c = !a.isConversationsOverviewHideable() && conversation == a.getSelectedConversation() ? a.getSecondaryBackgroundColor() : a.getPrimaryBackgroundColor(); + swipeableItem.setBackgroundColor(c); } TextView convName = (TextView) view.findViewById(R.id.conversation_name); if (conversation.getMode() == Conversation.MODE_SINGLE || activity.useSubjectToIdentifyConference()) { |