Skip to content

Commit

Permalink
Fix issue with "Unsupported gitflow version" message presented at sta…
Browse files Browse the repository at this point in the history
…rtup #328 #329
  • Loading branch information
OpherV committed Aug 18, 2021
1 parent ea17872 commit e4995a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ patchPluginXml {
<H2>Changelog for 0.7.7</H2>
<ul>
<li>Fix issue with "Unsupported gitflow version" message presented at startup #328 #329</li>
<li>Support for 2021.2 build</li>
</ul>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/gitflow/GitflowVersionTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ public void init(){
version = returnedVersion;
}
}

public boolean hasVersionBeenTested(){
return version != null;
}
}
9 changes: 7 additions & 2 deletions src/main/java/gitflow/ui/GitflowWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public ListPopup getPopupStep() {
@NotNull
@Override
public String getSelectedValue() {
if (!getIsSupportedVersion()) {
if (getHasVersionBeenTested() && !getIsSupportedVersion()) {
return "Unsupported Git Flow Version";
}
return myText;
Expand Down Expand Up @@ -283,7 +283,12 @@ public float getAlignment() {
}

public boolean getIsSupportedVersion(){
return GitflowVersionTester.forProject(myProject).isSupportedVersion();
GitflowVersionTester versionTester = GitflowVersionTester.forProject(myProject);
return versionTester.hasVersionBeenTested() && versionTester.isSupportedVersion();
}

public boolean getHasVersionBeenTested(){
return GitflowVersionTester.forProject(myProject).hasVersionBeenTested();
}

private void initVersionCheck(){
Expand Down

0 comments on commit e4995a9

Please sign in to comment.