docs: contact profile view should not use dc_contact_is_verified()

Green checkmark in the contact profile
should only be displayed in the title
if the same checkmark is displayed in the title of 1:1 chat.
If 1:1 chat does not exist,
the checkmark should not be displayed in the title
of the contact profile.

Also add docs to is_protected
property of FullChat and BasicChat JSON objects.
This commit is contained in:
link2xt
2023-11-05 16:57:47 +00:00
parent 6c68f2eb7e
commit 7c744d14d7
5 changed files with 68 additions and 12 deletions

View File

@@ -1584,6 +1584,15 @@ impl Chat {
}
/// Returns true if chat protection is enabled.
///
/// UI should display a green checkmark
/// in the chat title,
/// in the chat profile title and
/// in the chatlist item
/// if chat protection is enabled.
/// UI should also display a green checkmark
/// in the contact profile
/// if 1:1 chat with this contact exists and is protected.
pub fn is_protected(&self) -> bool {
self.protected == ProtectionStatus::Protected
}

View File

@@ -1258,11 +1258,14 @@ impl Contact {
///
/// If contact is verified
/// UI should display green checkmark after the contact name
/// in the title of the contact profile,
/// in contact list items and in chat member list items.
/// in contact list items and
/// in chat member list items.
///
/// Do not use this function when displaying profile view contents.
/// Use [Self::get_verifier_id] instead.
/// Do not use this function when displaying the contact profile view.
/// Display green checkmark in the title of the contact profile
/// if 1:1 chat with the contact exists and is protected.
/// Use [Self::get_verifier_id] to display the verifier contact
/// in the info section of the contact profile.
pub async fn is_verified(&self, context: &Context) -> Result<VerifiedStatus> {
// We're always sort of secured-verified as we could verify the key on this device any time with the key
// on this device