-
Notifications
You must be signed in to change notification settings - Fork 76
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: show pending ban/unban/kick state if the control node is offline #13752
Conversation
Jenkins BuildsClick to see older builds (9)
|
src/app/modules/main/module.nim
Outdated
isContact = contactDetails.dto.isContact, | ||
isVerified = contactDetails.dto.isContactVerified(), | ||
membershipRequestState = state, | ||
) |
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.
Small suggestion, maybe we can create util function in this module where we pass the contactDetails
and memberId
and it does the initMemberItem
. That way we don't have to duplicate all those lines.
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.
done 👍
ff0ebc9
to
19a56e3
Compare
@@ -1649,4 +1596,23 @@ method checkIfAddressWasCopied*[T](self: Module[T], value: string) = | |||
return | |||
self.addressWasShown(value) | |||
|
|||
method createMemberItem*[T](self: Module[T], memberId: string, state: MembershipRequestState, role: MemberRole): MemberItem = |
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.
Did you forget to create the forward declaration?
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.
hm... but it is working
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.
Maybe it's because of the io_interface
?
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.
maybe... I don't have deep knowledge of NIM, but during dev testing, everything is ok + this should be a compilation error
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.
Indeed. All's good then
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.
Good job, just a small suggestion
src/app/modules/main/module.nim
Outdated
icon = contactDetails.icon, | ||
colorId = contactDetails.colorId, | ||
colorHash = contactDetails.colorHash, | ||
onlineStatus = toOnlineStatus(self.controller.getStatusForContactWithId(memberId).statusType), |
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.
suggestion:
let status = self.controller.getStatusForContactWithId(memberId)
...
onlineStatus = toOnlineStatus(status.statusType)
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.
done
19a56e3
to
b46d738
Compare
b46d738
to
88d8530
Compare
What does the PR do
Show pending ban/unban/kick state if the control node is offline
Closes: #13596
Affected areas
kick/ban/unban state in the member's list