Skip to content

Commit

Permalink
fix: prevent automatic window opening when switching to preference pane
Browse files Browse the repository at this point in the history
Closes teaxyz#29
  • Loading branch information
stevenlei committed Dec 20, 2024
1 parent 737602b commit bfb7a8e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Sources/teaBASE.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ - (void)mainViewDidLoad {
}

- (void)willSelect {
// Close any open windows from previous pane
[self closeAllWindows];

// Initially disable all interactive elements
[self.gpgSignSwitch setEnabled:NO];
[self.homebrewSwitch setEnabled:NO];
Expand Down Expand Up @@ -93,6 +96,16 @@ - (void)willSelect {
});
}

- (void)closeAllWindows {
// Close all modal windows when switching panes
[self.sshPassphraseWindow close];
[self.sshRemovePassphraseWindow close];
[self.gpgPassphraseWindow close];
[self.brewInstallWindow close];
[self.gitGudWindow close];
[self.gitIdentityWindow close];
}

- (void)didSelect {
[self checkForUpdates];
}
Expand Down

0 comments on commit bfb7a8e

Please sign in to comment.