Skip to content

Commit

Permalink
fix: replace 'showState' in EditorPopupWindow with 'PopupWindow.isSho…
Browse files Browse the repository at this point in the history
…wing()'
  • Loading branch information
itsaky authored and Rosemoe committed Sep 30, 2023
1 parent f7ee449 commit 9648d08
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public class EditorPopupWindow {
private final int features;
private final int[] locationBuffer = new int[2];
private final EventReceiver<ScrollEvent> scrollListener;
private boolean showState;
private boolean registerFlag;
private boolean registered;
private View parentView;
Expand Down Expand Up @@ -154,7 +153,7 @@ public void unregister() {
}

public boolean isShowing() {
return showState;
return getPopup().isShowing();
}

/**
Expand Down Expand Up @@ -269,19 +268,17 @@ public void setLocationAbsolutely(int x, int y) {
* Show the window if appropriate
*/
public void show() {
if (showState) {
if (isShowing()) {
return;
}
applyWindowAttributes(true);
showState = true;
}

/**
* Dismiss the window
*/
public void dismiss() {
if (showState) {
showState = false;
if (isShowing()) {
window.dismiss();
}
}
Expand Down

0 comments on commit 9648d08

Please sign in to comment.