remove duplicate call to onConversationArchived()

This commit is contained in:
Daniel Gultsch 2018-03-29 16:23:36 +02:00
parent f2b0a10c22
commit 3dc749b22b
2 changed files with 1 additions and 6 deletions

View File

@ -159,7 +159,6 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
@Override @Override
public void onClick(View v) { public void onClick(View v) {
activity.xmppConnectionService.archiveConversation(conversation); activity.xmppConnectionService.archiveConversation(conversation);
activity.onConversationArchived(conversation);
} }
}; };
private OnClickListener joinMuc = new OnClickListener() { private OnClickListener joinMuc = new OnClickListener() {
@ -1130,7 +1129,6 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
break; break;
case R.id.action_archive: case R.id.action_archive:
activity.xmppConnectionService.archiveConversation(conversation); activity.xmppConnectionService.archiveConversation(conversation);
activity.onConversationArchived(conversation);
break; break;
case R.id.action_contact_details: case R.id.action_contact_details:
activity.switchToContactDetails(conversation.getContact()); activity.switchToContactDetails(conversation.getContact());
@ -1806,7 +1804,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
stopScrolling(); stopScrolling();
Log.d(Config.LOGTAG, "reInit(hasExtras=" + Boolean.toString(hasExtras) + ")"); Log.d(Config.LOGTAG, "reInit(hasExtras=" + Boolean.toString(hasExtras) + ")");
if (this.conversation.isRead() && hasExtras) { if (this.conversation.isRead() && hasExtras) {
Log.d(Config.LOGTAG, "trimming conversation"); Log.d(Config.LOGTAG, "trimming conversation");
this.conversation.trim(); this.conversation.trim();

View File

@ -227,9 +227,6 @@ public class ConversationsOverviewFragment extends XmppFragment implements Enhan
if (position == 0 && this.conversationsAdapter.getCount() == 0) { if (position == 0 && this.conversationsAdapter.getCount() == 0) {
final Conversation c = swipedConversation.pop(); final Conversation c = swipedConversation.pop();
activity.xmppConnectionService.archiveConversation(c); activity.xmppConnectionService.archiveConversation(c);
if (activity instanceof OnConversationArchived) {
((OnConversationArchived) activity).onConversationArchived(c);
}
return null; return null;
} }
final boolean formerlySelected = ConversationFragment.getConversation(getActivity()) == swipedConversation.peek(); final boolean formerlySelected = ConversationFragment.getConversation(getActivity()) == swipedConversation.peek();