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

Close windows via method call, minimize guis only if bot is running #320

Merged
merged 3 commits into from
Nov 3, 2023

Conversation

Punikekk
Copy link
Member

attempt to fix targeted offer missclicks

attempt to fix targeted offer missclicks
do not insta-close settings gui
repair hero via method call
close guis only when bot is running
@Punikekk Punikekk changed the title add possibility to close window via method call Close windows via method call, minimize guis only if bot is running Oct 14, 2023
@Punikekk Punikekk requested a review from Pablete1234 October 14, 2023 20:09
Comment on lines 112 to 113
if (!(minimizable && toggleVisibility()) && !(closable && close()))
legacyToggle(value);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (!(minimizable && toggleVisibility()) && !(closable && close()))
legacyToggle(value);
if (minimizable ? !toggleVisibility() : closeable ? !close() : false) {
legacyToggle(value);
}

This logic is kinda confusing and hard to follow, what exactly is the intended flow?

if minimizable -> toggleVisibility (and fallback to legacyToggle)
if closeable -> close (and fallback to legacyToggle)
if neither? do nothing? or legacyToggle?

Shouldn't value be used within this method? (ie, what the end goal state is) such that visible ? toggleVisibility() : close() ?

@Pablete1234 Pablete1234 merged commit b36f2f9 into darkbot-reloaded:master Nov 3, 2023
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.

2 participants