Skip to content

Commit

Permalink
fix #93
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamling committed Apr 20, 2024
1 parent 260ba82 commit 9e7abdd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cn/ieclipse/smartim/actions/HideContactAction.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package cn.ieclipse.smartim.actions;

import cn.ieclipse.smartim.views.IMPanel;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ToggleAction;
import icons.SmartIcons;
import org.jetbrains.annotations.NotNull;

/**
* Created by Jamling on 2017/7/12.
Expand All @@ -16,6 +18,11 @@ public HideContactAction(IMPanel panel) {
this.panel = panel;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

@Override public boolean isSelected(AnActionEvent anActionEvent) {
return panel.isLeftHidden();
}
Expand Down
7 changes: 7 additions & 0 deletions src/cn/ieclipse/smartim/actions/ScrollLockAction.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package cn.ieclipse.smartim.actions;

import cn.ieclipse.smartim.console.IMChatConsole;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.ui.ToggleActionButton;
import icons.SmartIcons;
import org.jetbrains.annotations.NotNull;

public class ScrollLockAction extends ToggleActionButton {
IMChatConsole console;
Expand All @@ -13,6 +15,11 @@ public ScrollLockAction(IMChatConsole console) {
this.console = console;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

@Override public boolean isSelected(AnActionEvent anActionEvent) {
return !console.isScrollLock();
}
Expand Down

0 comments on commit 9e7abdd

Please # to comment.