mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
don't show contact details when in conversations with self
This commit is contained in:
parent
2713fd50c8
commit
b99d70bfe7
@ -336,6 +336,10 @@ public class Conversation extends AbstractEntity implements Blockable {
|
|||||||
return this.correctingMessage;
|
return this.correctingMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean withSelf() {
|
||||||
|
return getContact().isSelf();
|
||||||
|
}
|
||||||
|
|
||||||
public interface OnMessageFound {
|
public interface OnMessageFound {
|
||||||
void onMessageFound(final Message message);
|
void onMessageFound(final Message message);
|
||||||
}
|
}
|
||||||
|
@ -411,6 +411,7 @@ public class ConversationActivity extends XmppActivity
|
|||||||
menuInviteContact.setVisible(getSelectedConversation().getMucOptions().canInvite());
|
menuInviteContact.setVisible(getSelectedConversation().getMucOptions().canInvite());
|
||||||
menuSecure.setVisible((Config.supportOpenPgp() || Config.supportOmemo()) && Config.multipleEncryptionChoices()); //only if pgp is supported we have a choice
|
menuSecure.setVisible((Config.supportOpenPgp() || Config.supportOmemo()) && Config.multipleEncryptionChoices()); //only if pgp is supported we have a choice
|
||||||
} else {
|
} else {
|
||||||
|
menuContactDetails.setVisible(!this.getSelectedConversation().withSelf());
|
||||||
menuMucDetails.setVisible(false);
|
menuMucDetails.setVisible(false);
|
||||||
menuSecure.setVisible(Config.multipleEncryptionChoices());
|
menuSecure.setVisible(Config.multipleEncryptionChoices());
|
||||||
}
|
}
|
||||||
|
@ -468,8 +468,10 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||||||
highlightInConference(user);
|
highlightInConference(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (!message.getContact().isSelf()) {
|
||||||
activity.switchToContactDetails(message.getContact(), message.getFingerprint());
|
activity.switchToContactDetails(message.getContact(), message.getFingerprint());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Account account = message.getConversation().getAccount();
|
Account account = message.getConversation().getAccount();
|
||||||
Intent intent = new Intent(activity, EditAccountActivity.class);
|
Intent intent = new Intent(activity, EditAccountActivity.class);
|
||||||
|
Loading…
Reference in New Issue
Block a user