aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationFragment.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-21 16:16:09 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-21 16:16:09 +0200
commit2fe20ffa8e8cfdb6b089e034c4f02010a7c740e6 (patch)
tree8512ded7da3d54719667ec03fbaadf6b5005c9e2 /src/eu/siacs/conversations/ui/ConversationFragment.java
parentf9ed76f5e130f744e118ac752728949688a206a9 (diff)
fixed #267
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index 202bab2e..546d039e 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -699,8 +699,19 @@ public class ConversationFragment extends Fragment {
return;
}
hideSnackbar();
- ConversationActivity activity = (ConversationActivity) getActivity();
+ final ConversationActivity activity = (ConversationActivity) getActivity();
if (this.conversation != null) {
+ final Contact contact = this.conversation.getContact();
+ if (!contact.showInRoster() && contact.getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) {
+ showSnackbar(R.string.contact_added_you, R.string.add_back, new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ activity.xmppConnectionService.createContact(contact);
+ activity.switchToContactDetails(contact);
+ }
+ });
+ }
for (Message message : this.conversation.getMessages()) {
if ((message.getEncryption() == Message.ENCRYPTION_PGP)
&& ((message.getStatus() == Message.STATUS_RECIEVED) || (message