add suggested contacts to roster on first message
This commit is contained in:
parent
ffc509ae26
commit
e450626d5c
|
@ -1205,6 +1205,16 @@ public class XmppConnectionService extends Service {
|
|||
}
|
||||
final Conversation conversation = (Conversation) message.getConversation();
|
||||
account.deactivateGracePeriod();
|
||||
|
||||
|
||||
if (QuickConversationsService.isQuicksy() && conversation.getMode() == Conversation.MODE_SINGLE) {
|
||||
final Contact contact = conversation.getContact();
|
||||
if (!contact.showInRoster() && contact.getOption(Contact.Options.SYNCED_VIA_OTHER)) {
|
||||
Log.d(Config.LOGTAG,account.getJid().asBareJid()+": adding "+contact.getJid()+" on sending message");
|
||||
createContact(contact, true);
|
||||
}
|
||||
}
|
||||
|
||||
MessagePacket packet = null;
|
||||
final boolean addToConversation = (conversation.getMode() != Conversation.MODE_MULTI
|
||||
|| !Patches.BAD_MUC_REFLECTION.contains(account.getServerIdentity()))
|
||||
|
|
|
@ -1068,7 +1068,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
|
|||
if (contact.isSelf()) {
|
||||
showContactDetailsItem.setVisible(false);
|
||||
}
|
||||
deleteContactMenuItem.setVisible(contact.showInRoster());
|
||||
deleteContactMenuItem.setVisible(contact.showInRoster() && !contact.getOption(Contact.Options.SYNCED_VIA_OTHER));
|
||||
XmppConnection xmpp = contact.getAccount().getXmppConnection();
|
||||
if (xmpp != null && xmpp.getFeatures().blocking() && !contact.isSelf()) {
|
||||
if (contact.isBlocked()) {
|
||||
|
@ -1115,8 +1115,8 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
|
|||
}
|
||||
|
||||
public class ListPagerAdapter extends PagerAdapter {
|
||||
FragmentManager fragmentManager;
|
||||
MyListFragment[] fragments;
|
||||
private final FragmentManager fragmentManager;
|
||||
private final MyListFragment[] fragments;
|
||||
|
||||
ListPagerAdapter(FragmentManager fm) {
|
||||
fragmentManager = fm;
|
||||
|
|
Loading…
Reference in New Issue