Skip to content
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

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

mprakhov
Copy link
Contributor

@mprakhov mprakhov commented Feb 27, 2024

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

@status-im-auto
Copy link
Member

status-im-auto commented Feb 27, 2024

Jenkins Builds

Click to see older builds (9)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a5001e0 #1 2024-02-27 16:29:54 ~6 min tests/nim 📄log
✔️ a5001e0 #1 2024-02-27 16:34:47 ~11 min tests/ui 📄log
✔️ a5001e0 #1 2024-02-27 16:39:06 ~15 min linux/x86_64 📦tgz
✔️ 19a56e3 #3 2024-02-27 17:02:54 ~7 min tests/nim 📄log
✔️ 19a56e3 #3 2024-02-27 17:06:10 ~10 min tests/ui 📄log
✔️ 19a56e3 #3 2024-02-27 17:09:15 ~13 min macos/aarch64 🍎dmg
✔️ 19a56e3 #3 2024-02-27 17:14:22 ~18 min linux/x86_64 📦tgz
✔️ 19a56e3 #3 2024-02-27 17:21:24 ~25 min windows/x86_64 💿exe
✔️ 19a56e3 #3 2024-02-27 18:28:39 ~1 hr 32 min macos/x86_64 🍎dmg
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ b46d738 #4 2024-02-28 10:58:49 ~4 min macos/aarch64 🍎dmg
✔️ b46d738 #4 2024-02-28 11:04:26 ~10 min macos/x86_64 🍎dmg
✔️ b46d738 #4 2024-02-28 11:05:04 ~10 min tests/nim 📄log
✔️ b46d738 #4 2024-02-28 11:10:22 ~15 min tests/ui 📄log
✔️ b46d738 #4 2024-02-28 11:12:56 ~18 min linux/x86_64 📦tgz
✔️ b46d738 #4 2024-02-28 11:19:50 ~25 min windows/x86_64 💿exe
✔️ 88d8530 #5 2024-02-28 13:18:17 ~6 min tests/nim 📄log
✔️ 88d8530 #5 2024-02-28 13:19:32 ~7 min macos/aarch64 🍎dmg
✔️ 88d8530 #5 2024-02-28 13:20:21 ~8 min macos/x86_64 🍎dmg
✔️ 88d8530 #5 2024-02-28 13:23:13 ~11 min tests/ui 📄log
✔️ 88d8530 #5 2024-02-28 13:25:55 ~14 min linux/x86_64 📦tgz
✔️ 88d8530 #5 2024-02-28 13:34:40 ~22 min windows/x86_64 💿exe

isContact = contactDetails.dto.isContact,
isVerified = contactDetails.dto.isContactVerified(),
membershipRequestState = state,
)
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 👍

@mprakhov mprakhov force-pushed the mp/issue-13596 branch 2 times, most recently from ff0ebc9 to 19a56e3 Compare February 27, 2024 16:55
@@ -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 =
Copy link
Member

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?

Copy link
Contributor Author

@mprakhov mprakhov Feb 27, 2024

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

Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor

@MishkaRogachev MishkaRogachev left a 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

icon = contactDetails.icon,
colorId = contactDetails.colorId,
colorHash = contactDetails.colorHash,
onlineStatus = toOnlineStatus(self.controller.getStatusForContactWithId(memberId).statusType),
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@mprakhov mprakhov merged commit eb50a42 into master Feb 28, 2024
8 checks passed
@mprakhov mprakhov deleted the mp/issue-13596 branch February 28, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ban/unban/kicking pending state button disappearing after TM or admin actions when the control node is offline
4 participants