-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(contacts): remove isContact, use isMutualContact or isAdded indead #6375
Conversation
e6cbe97
to
ee217af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing that 👍
Please change all occurrences of isMutualContact
back to isContact
(democracy here :D)
@@ -32,7 +32,7 @@ type | |||
colorId: int | |||
colorHash: string | |||
onlineStatus: OnlineStatus | |||
isContact: bool | |||
isMutualContact: bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isMutualContact: bool | |
isContact: bool |
@@ -12,7 +12,7 @@ type | |||
ColorId | |||
ColorHash | |||
OnlineStatus | |||
IsContact | |||
IsMutualContact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsMutualContact | |
IsContact |
@@ -12,7 +12,7 @@ Item { | |||
width: parent.width | |||
height: childrenRect.height | |||
|
|||
property bool isContact | |||
property bool isContactAdded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
property bool isContactAdded | |
property bool isUserAdded |
@@ -55,7 +55,7 @@ Item { | |||
property Timer timer: Timer { } | |||
property var userList | |||
property var contactDetails: Utils.getContactDetailsAsJson(root.activeChatId) | |||
property bool isContact: root.contactDetails.isContact | |||
property bool isContactAdded: root.contactDetails.isAdded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
property bool isContactAdded: root.contactDetails.isAdded | |
property bool isUserAdded: root.userDetails.isAdded |
@@ -177,7 +177,7 @@ StatusAppThreePanelLayout { | |||
confirmationText: qsTr("Are you sure you want to remove this contact?") | |||
onConfirmButtonClicked: { | |||
let pk = chatColumn.contactToRemove | |||
if (Utils.getContactDetailsAsJson(pk).isContact) { | |||
if (Utils.getContactDetailsAsJson(pk).isAdded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not required)
if (Utils.getContactDetailsAsJson(pk).isAdded) { | |
if (Utils.getUserDetailsAsJson(pk).isAdded) { |
we should probably create a separate task to fix status-desktup codebase naming in regards to contact vs user
ee217af
to
bb4fc3e
Compare
@osmaczko updated. |
Jenkins Builds
|
Great, thank you.
Of course, I haven't expected anything else! -> "we should probably create a separate task to fix status-desktup codebase naming in regards to contact vs user" |
Fixes #6220 Fixes the issue with the mutual contact icon showing when just added. It also does a huge cleanup of the codebase to remove isContact and replace it with either isAdded, when we care only about if we added, or isMutualContact if we want the contact to be mutual Also fixes an issue with the MessageContextMenu not reflecting the added state correctly.
bb4fc3e
to
715ea1c
Compare
Fixes #6220
Fixes the issue with the mutual contact icon showing when just added.
It also does a huge cleanup of the codebase to remove isContact and replace it with either isAdded, when we care only about if we added, or isMutualContact if we want the contact to be mutual
Also fixes an issue with the MessageContextMenu not reflecting the added state correctly.
Asking for QA testing on this one, since it touches contacts all over the app. I made sure to double check my changes to make sure to use isAdded and isMutualContact appropriately, but the reason why I did this change is because
isContact
was used in both contexts, so it was confusing.Anyway, all that to say, make sure the contact list, states and other interactions still work as expected.