From 1961947b9124e4f06329427cc35767025b73bfa2 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Thu, 23 Aug 2018 14:18:52 +0200 Subject: [PATCH] Stuff with removing online presence Signed-off-by: Mario Danic --- .../talk/adapters/items/ConversationItem.java | 17 ----- .../CallNotificationController.java | 2 +- .../res/drawable/shape_bubble_offline.xml | 13 ---- .../main/res/drawable/shape_bubble_online.xml | 13 ---- .../res/drawable/shape_favorite_bubble.xml | 30 +++++++++ .../main/res/drawable/shape_lock_bubble.xml | 30 +++++++++ ...rv_item_conversation_with_last_message.xml | 67 ++++++------------- 7 files changed, 83 insertions(+), 89 deletions(-) delete mode 100644 app/src/main/res/drawable/shape_bubble_offline.xml delete mode 100644 app/src/main/res/drawable/shape_bubble_online.xml create mode 100644 app/src/main/res/drawable/shape_favorite_bubble.xml create mode 100644 app/src/main/res/drawable/shape_lock_bubble.xml diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java index 6e92ab4e1..8dc9b0c6e 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java @@ -206,18 +206,6 @@ public class ConversationItem extends AbstractFlexibleItem 0) { - if (conversation.getCount() == 2 || (conversation.getCount() == 1 && - conversation.getSessionId().equals("0"))) { - holder.onlineIndicator.setBackground(context.getDrawable(R.drawable.shape_bubble_online)); - } else { - holder.onlineIndicator.setBackground(context.getDrawable(R.drawable.shape_bubble_offline)); - } - } else { - holder.onlineIndicator.setBackground(context.getDrawable(R.drawable.shape_bubble_offline)); - } if (!TextUtils.isEmpty(conversation.getName())) { GlideUrl glideUrl = new GlideUrl(ApiUtils.getUrlForAvatarWithName(userEntity.getBaseUrl(), @@ -240,7 +228,6 @@ public class ConversationItem extends AbstractFlexibleItem - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_bubble_online.xml b/app/src/main/res/drawable/shape_bubble_online.xml deleted file mode 100644 index e1e6f7a06..000000000 --- a/app/src/main/res/drawable/shape_bubble_online.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_favorite_bubble.xml b/app/src/main/res/drawable/shape_favorite_bubble.xml new file mode 100644 index 000000000..3d0df3a8d --- /dev/null +++ b/app/src/main/res/drawable/shape_favorite_bubble.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_lock_bubble.xml b/app/src/main/res/drawable/shape_lock_bubble.xml new file mode 100644 index 000000000..4233ed76a --- /dev/null +++ b/app/src/main/res/drawable/shape_lock_bubble.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/rv_item_conversation_with_last_message.xml b/app/src/main/res/layout/rv_item_conversation_with_last_message.xml index 2c9f92821..a67e65b8a 100644 --- a/app/src/main/res/layout/rv_item_conversation_with_last_message.xml +++ b/app/src/main/res/layout/rv_item_conversation_with_last_message.xml @@ -34,10 +34,10 @@ android:layout_margin="16dp"> + android:layout_centerVertical="true"> + + - + android:background="@drawable/shape_favorite_bubble"/> + android:maxLines="1" + android:textColor="@color/nc_incoming_text_default" + android:textSize="16sp"/> + android:maxLines="1" + android:textColor="@color/warm_grey_two"/> + android:layout_centerVertical="true" + android:layout_marginEnd="8dp"/> + android:textColor="@color/warm_grey_four"/> - - - - - - - - -