@@ -35,13 +35,14 @@ public class GitHubManager extends AbstractManager {
3535
3636 private static final String PROPERTY_gitUsername = "gitUsername" ;
3737 private static final String PROPERTY_gitEmail = "gitEmail" ;
38+ private static final String PROPERTY_hasShowGitDialog = "hasShowGitDialog" ;
3839
3940 private String clientId ;
4041 private String username ;
4142 private String emailAddress ;
4243 private String userAccessToken ;
4344 private String lastDeviceLoginCode ;
44- private boolean hasAskedForGitUser ;
45+ private boolean hasShowGitDialog ;
4546
4647 /**
4748 * Returns the current instance of the GitHubManager class.
@@ -67,6 +68,8 @@ public void initialize(Properties properties) {
6768 emailAddress = properties .getProperty (PROPERTY_gitEmail );
6869 if (username != null ) username = username .trim ();
6970 if (emailAddress != null ) emailAddress = emailAddress .trim ();
71+
72+ hasShowGitDialog = properties .getProperty (PROPERTY_hasShowGitDialog , "false" ).equals ("true" );
7073 }
7174
7275 @ Override public void saveSettings (Properties properties ) {
@@ -76,6 +79,7 @@ public void initialize(Properties properties) {
7679 if (emailAddress != null && !emailAddress .isBlank ()) {
7780 properties .put (PROPERTY_gitEmail , emailAddress );
7881 }
82+ properties .put (PROPERTY_hasShowGitDialog , hasShowGitDialog ? "true" : "false" );
7983 }
8084
8185 public boolean hasUsernameAndEmail () {
@@ -557,6 +561,10 @@ public void setRepositoryTopics(String repositoryName, List<String> topics) thro
557561 * After the dialog is shown, it will not be shown again.
558562 */
559563 public void showFirstTimeDialog () {
560- SetGitUserUI .show ();
564+ if (!hasShowGitDialog ) {
565+ SetGitUserUI .show ();
566+ hasShowGitDialog = true ;
567+ MainApp .get ().saveSettings ();
568+ }
561569 }
562570}
0 commit comments