aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java1
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java1
-rw-r--r--src/main/java/eu/siacs/conversations/ui/XmppActivity.java8
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java15
-rw-r--r--src/main/res/layout/conversation_list_row.xml2
5 files changed, 13 insertions, 14 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 9533ffc7..c8a1e6df 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -973,6 +973,7 @@ public class ConversationActivity extends XmppActivity
xmppConnectionService.getNotificationService().setOpenConversation(null);
}
+ @SuppressLint("NewApi")
private static List<Uri> extractUriFromIntent(final Intent intent) {
List<Uri> uris = new ArrayList<>();
Uri uri = intent.getData();
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index d5f20e41..a3a02b27 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -268,7 +268,6 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
if (conversation.getNextCounterpart() != null) {
message.setCounterpart(conversation.getNextCounterpart());
message.setType(Message.TYPE_PRIVATE);
- conversation.setNextCounterpart(null);
}
}
if (conversation.getNextEncryption(activity.forceEncryption()) == Message.ENCRYPTION_OTR) {
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
index 7eaec10c..392e57a7 100644
--- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
@@ -90,6 +90,7 @@ public abstract class XmppActivity extends Activity {
protected int mPrimaryTextColor;
protected int mSecondaryTextColor;
+ protected int mPrimaryBackgroundColor;
protected int mSecondaryBackgroundColor;
protected int mColorRed;
protected int mColorOrange;
@@ -331,6 +332,7 @@ public abstract class XmppActivity extends Activity {
mColorOrange = getResources().getColor(R.color.orange);
mColorGreen = getResources().getColor(R.color.green);
mPrimaryColor = getResources().getColor(R.color.primary);
+ mPrimaryBackgroundColor = getResources().getColor(R.color.primarybackground);
mSecondaryBackgroundColor = getResources().getColor(R.color.secondarybackground);
this.mTheme = findTheme();
setTheme(this.mTheme);
@@ -740,7 +742,11 @@ public abstract class XmppActivity extends Activity {
public int getOnlineColor() {
return this.mColorGreen;
}
-
+
+ public int getPrimaryBackgroundColor() {
+ return this.mPrimaryBackgroundColor;
+ }
+
public int getSecondaryBackgroundColor() {
return this.mSecondaryBackgroundColor;
}
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 a48f6ae4..d5b7e4c0 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()) {
diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml
index de04780f..69abb225 100644
--- a/src/main/res/layout/conversation_list_row.xml
+++ b/src/main/res/layout/conversation_list_row.xml
@@ -6,7 +6,7 @@
<View
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:background="@color/divider"/>
+ android:background="@color/primary"/>
<FrameLayout
android:id="@+id/swipeable_item"