aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorBrianBlade <n.gelbertz@gmail.com>2015-04-04 16:06:50 +0200
committerBrianBlade <n.gelbertz@gmail.com>2015-04-04 16:06:50 +0200
commit09aae952e89f7d522a7bb0d192e2ba4a49aea79d (patch)
treefa26482e96eca3855e5e96690d9549f83036107a /src/main/java/eu
parent34a404ca31ef83973223cd93cdc75b6ae8c497de (diff)
Add blacklistedConversation for undo swipe
Update title_undo_swipe_* strings
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index d2a5c855..5f963da1 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -76,6 +76,7 @@ public class ConversationActivity extends XmppActivity
private View mContentView;
private List<Conversation> conversationList = new ArrayList<>();
+ private Conversation blacklistedConversation = null;
private Conversation mSelectedConversation = null;
private EnhancedListView listView;
private ConversationFragment mConversationFragment;
@@ -186,6 +187,7 @@ public class ConversationActivity extends XmppActivity
final Conversation item = listAdapter.getItem(position);
listAdapter.remove(item);
listAdapter.notifyDataSetChanged();
+ blacklistedConversation = item;
if (position == 0 && listAdapter.getCount() == 0) {
endConversation(item, false, true);
@@ -202,11 +204,13 @@ public class ConversationActivity extends XmppActivity
public void undo() {
listAdapter.insert(item, position);
listAdapter.notifyDataSetChanged();
+ blacklistedConversation = null;
}
@Override
public void discard() {
endConversation(item, false, false);
+ blacklistedConversation = null;
}
@Override
@@ -214,7 +218,7 @@ public class ConversationActivity extends XmppActivity
if (item.getMode() == Conversation.MODE_MULTI) {
return getResources().getString(R.string.title_undo_swipe_out_muc);
} else {
- return getResources().getString(R.string.title_undo_swipe_out_conversation, item.getName());
+ return getResources().getString(R.string.title_undo_swipe_out_conversation);
}
}
};
@@ -1120,6 +1124,7 @@ public class ConversationActivity extends XmppActivity
@Override
protected void refreshUiReal() {
updateConversationList();
+ conversationList.remove(blacklistedConversation);
if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 0) {
if (!mRedirected) {
this.mRedirected = true;