fixed #267
This commit is contained in:
parent
f9ed76f5e1
commit
2fe20ffa8e
|
@ -272,4 +272,6 @@
|
||||||
<string name="action_edit_subject">Edit conference subject</string>
|
<string name="action_edit_subject">Edit conference subject</string>
|
||||||
<string name="conference_not_found">Conference not found</string>
|
<string name="conference_not_found">Conference not found</string>
|
||||||
<string name="leave">Leave</string>
|
<string name="leave">Leave</string>
|
||||||
|
<string name="contact_added_you">Contact added you to contact list</string>
|
||||||
|
<string name="add_back">Add back</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -699,8 +699,19 @@ public class ConversationFragment extends Fragment {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hideSnackbar();
|
hideSnackbar();
|
||||||
ConversationActivity activity = (ConversationActivity) getActivity();
|
final ConversationActivity activity = (ConversationActivity) getActivity();
|
||||||
if (this.conversation != null) {
|
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()) {
|
for (Message message : this.conversation.getMessages()) {
|
||||||
if ((message.getEncryption() == Message.ENCRYPTION_PGP)
|
if ((message.getEncryption() == Message.ENCRYPTION_PGP)
|
||||||
&& ((message.getStatus() == Message.STATUS_RECIEVED) || (message
|
&& ((message.getStatus() == Message.STATUS_RECIEVED) || (message
|
||||||
|
|
|
@ -264,6 +264,7 @@ public abstract class XmppActivity extends Activity {
|
||||||
Account account = conversation.getAccount();
|
Account account = conversation.getAccount();
|
||||||
Contact contact = account.getRoster().getContact(jid);
|
Contact contact = account.getRoster().getContact(jid);
|
||||||
xmppConnectionService.createContact(contact);
|
xmppConnectionService.createContact(contact);
|
||||||
|
switchToContactDetails(contact);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
|
|
Loading…
Reference in a new issue