Fix display of powerline font installation message

This commit is contained in:
Matthew Breedlove
2025-08-20 03:20:21 -04:00
parent bf97dc4287
commit 02857bd43c
+11 -7
View File
@@ -441,14 +441,18 @@ export const App: React.FC = () => {
}}
onInstallFonts={() => {
setInstallingFonts(true);
void installPowerlineFonts().then((result) => {
setInstallingFonts(false);
setFontInstallMessage(result.message);
// Refresh font status
void checkPowerlineFontsAsync().then((asyncStatus) => {
setPowerlineFontStatus(asyncStatus);
// Add a small delay to allow React to render the "Installing..." message
// before the blocking execSync calls in installPowerlineFonts
setTimeout(() => {
void installPowerlineFonts().then((result) => {
setInstallingFonts(false);
setFontInstallMessage(result.message);
// Refresh font status
void checkPowerlineFontsAsync().then((asyncStatus) => {
setPowerlineFontStatus(asyncStatus);
});
});
});
}, 50);
}}
installingFonts={installingFonts}
fontInstallMessage={fontInstallMessage}