Skip to content

Commit

Permalink
Merge remote-tracking branch 'rad/patches/a9d52650f80f336bd0417135bd4…
Browse files Browse the repository at this point in the history
…0e447ec5d9b61'
  • Loading branch information
JChrist committed May 2, 2024
2 parents 08577f5 + 4f928a2 commit 723c95e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
import org.jetbrains.annotations.NotNull;

public class RadicleTrackAction extends AnAction {

@Override
public void update(@NotNull AnActionEvent e) {
RadAction.showRadIcon(e);
}

@Override
public void actionPerformed(@NotNull AnActionEvent e) {
if (!RadAction.isCliPathConfigured(e.getProject())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ public static void showRadIcon(@NotNull AnActionEvent e) {
}
final var gitRepoManager = GitRepositoryManager.getInstance(e.getProject());
var repos = gitRepoManager.getRepositories();
e.getPresentation().setEnabledAndVisible(repos.size() > 0);
var initializedRepos = getInitializedReposWithNodeConfigured(repos, false);
e.getPresentation().setEnabledAndVisible(!initializedRepos.isEmpty());
}

public static boolean isCliPathConfigured(Project project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ protected void doOKAction() {
if (radToolWindow == null || radToolWindow.isAvailable()) {
return;
}
repo.update();
ApplicationManager.getApplication().invokeLater(() -> {
ClientProperty.put(radToolWindow.getComponent(), RAD_REPOS_KEY, List.of(repo));
radToolWindow.setAvailable(true);
Expand Down

0 comments on commit 723c95e

Please sign in to comment.