Skip to content

Commit 70a51d5

Browse files
committed
feat: reset jlink compatibility icon after succesful install
1 parent b81698f commit 70a51d5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/launcher/features/apps/App/AppIcon.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import path from 'path';
99

1010
import { type App, isInstalled } from '../../../../ipc/apps';
1111
import appCompatibilityWarning from '../../../util/appCompatibilityWarning';
12+
import { useLauncherSelector } from '../../../util/hooks';
13+
import { isJLinkFinishedInstalling } from '../../jlinkUpdate/jlinkUpdateSlice';
1214
import { type DisplayedApp, isInProgress } from '../appsSlice';
1315

1416
const warning = (altText: string) => (
@@ -33,12 +35,14 @@ const appBadge = async (app: App) => {
3335
const AppIcon: React.FC<{ app: DisplayedApp }> = ({ app }) => {
3436
const [badge, setBadge] =
3537
useState<Awaited<ReturnType<typeof appBadge>>>(null);
38+
const jlinkInstalled = useLauncherSelector(isJLinkFinishedInstalling);
3639

3740
useEffect(() => {
3841
if (!isInProgress(app)) {
3942
appBadge(app).then(setBadge);
4043
}
41-
}, [app]);
44+
// Trigger this once more after JLink was successfully installed or updated
45+
}, [app, jlinkInstalled]);
4246

4347
return (
4448
<div className="core-app-icon">

0 commit comments

Comments
 (0)