~singpolyma/cheogram-android

efeb8fccb50412b184d14dfd7b8f71cea8a82077 — Stephen Paul Weber 11 months ago cbc813c
Only set "Note to Self" on a *copy*
M src/main/java/eu/siacs/conversations/entities/Contact.java => src/main/java/eu/siacs/conversations/entities/Contact.java +5 -0
@@ 83,6 83,11 @@ public class Contact implements ListItem, Blockable {
    private String mLastPresence = null;
    private RtpCapability.Capability rtpCapability;

    public Contact(Contact other) {
        this(other.getAccount().getUuid(), other.systemName, other.serverName, other.presenceName, other.jid, other.subscription, other.photoUri, other.systemAccount, other.keys.toString(), other.getAvatar().sha1sum, other.mLastseen, other.mLastPresence, other.groups.toString(), other.rtpCapability);
        setAccount(other.getAccount());
    }

    public Contact(final String account, final String systemName, final String serverName, final String presenceName,
                   final Jid jid, final int subscription, final String photoUri,
                   final Uri systemAccount, final String keys, final String avatar, final long lastseen,

M src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java => src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +2 -2
@@ 1178,9 1178,9 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
                    }
                }

                final Contact self = account.getSelfContact();
                final Contact self = new Contact(account.getSelfContact());
                self.setSystemName("Note to Self");
                if (self.match(this, needle)) {
                    self.setSystemName("Note to Self");
                    this.contacts.add(self);
                }