Skip to content

Commit fc54e0f

Browse files
authored
Initialize Offline contribution on Restored phase (microsoft#158261)
In a rare case of the slow network, Chrome can signal that the network is offline during the VSCode initialization - while the workbench parts still were not created, but the Offline contribution was already registered (since Starting is an initial lifecycle stage). Then as assertion is thrown from the Offline contribution, and it only updates the color of the status bar, but does not place the 'Offline' status bar item - I think this may be confusing for users; also the status bar color will never change back if the attempt to change a status bar will happen during the Offline contribtion *construction* - there will be no code to change it back. Solution: initialize the Offline contribution later; this should not make a big difference.
1 parent 153ef38 commit fc54e0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/offline/browser/offline.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ export class OfflineStatusBarController implements IWorkbenchContribution {
9494
}
9595

9696
Registry.as<IWorkbenchContributionsRegistry>(Extensions.Workbench)
97-
.registerWorkbenchContribution(OfflineStatusBarController, LifecyclePhase.Starting);
97+
.registerWorkbenchContribution(OfflineStatusBarController, LifecyclePhase.Restored);

0 commit comments

Comments
 (0)