-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Improve permission handling around interaction events #10599
base: version/main
Are you sure you want to change the base?
Conversation
# Conflicts: # src/main/java/com/minecolonies/core/client/gui/townhall/WindowMainPage.java
@@ -203,10 +171,7 @@ public String getLabel(final int index) | |||
*/ | |||
private void toggleTexture(final DropDownList dropDownList) |
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.
I remember we had those ifs so that it doesn't toggle on UI open already or so. (no need to toggle for same as selected)
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.
I fixed that by actually calling the methods in the correct order during setup.
-> First assign data provider
-> Set selected index
-> Set update handler
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.
Also, the if statements had a negative side effect, because changing back to the initially selected item was not possible because the final values did not update, so that's another bug fixed
Did you test this very well for all the permission things you changed, both where you should have and shouldn't have permission? It touches a lot of stuff, so it should be well tested |
I ensured that all events under every condition work as they should, I had a MP server open where I slowly granted the other player additional permissions to see if all the conditions worked as they should. Note: There are some odd behavioural ones, but that's unfortunate due to how Mojang calls these different events. |
Changes proposed in this pull request
Testing
Review please