mirror of
https://github.com/voideditor/void
synced 2026-05-23 09:28:23 +00:00
remove jitter on load
This commit is contained in:
parent
657e752987
commit
520c971e3e
1 changed files with 4 additions and 23 deletions
|
|
@ -146,25 +146,6 @@ export class EditorGroupWatermark extends Disposable {
|
|||
|
||||
|
||||
private render(): void {
|
||||
// const enabled = this.configurationService.getValue<boolean>('workbench.tips.enabled');
|
||||
|
||||
// if (enabled === this.enabled) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// this.enabled = enabled;
|
||||
|
||||
|
||||
// if (!enabled) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// const hasFolder = this.workbenchState !== WorkbenchState.EMPTY;
|
||||
// const selected = (hasFolder ? folderEntries : noFolderEntries)
|
||||
// .filter(entry => !('when' in entry) || this.contextKeyService.contextMatchesRules(entry.when))
|
||||
// .filter(entry => !('mac' in entry) || entry.mac === (isMacintosh && !isWeb))
|
||||
// .filter(entry => !!CommandsRegistry.getCommand(entry.id))
|
||||
// .filter(entry => !!this.keybindingService.lookupKeybinding(entry.id));
|
||||
|
||||
this.clear();
|
||||
const voidIconBox = append(this.shortcuts, $('.watermark-box'));
|
||||
|
|
@ -176,6 +157,10 @@ export class EditorGroupWatermark extends Disposable {
|
|||
|
||||
const update = async () => {
|
||||
|
||||
// put async at top so don't need to wait (this prevents a jitter on load)
|
||||
const recentlyOpened = await this.workspacesService.getRecentlyOpened()
|
||||
.catch(() => ({ files: [], workspaces: [] })).then(w => w.workspaces);
|
||||
|
||||
clearNode(voidIconBox);
|
||||
clearNode(recentsBox);
|
||||
|
||||
|
|
@ -206,10 +191,6 @@ export class EditorGroupWatermark extends Disposable {
|
|||
|
||||
|
||||
// Recents
|
||||
const recentlyOpened = await this.workspacesService.getRecentlyOpened()
|
||||
.catch(() => ({ files: [], workspaces: [] })).then(w => w.workspaces);
|
||||
|
||||
|
||||
if (recentlyOpened.length !== 0) {
|
||||
|
||||
voidIconBox.append(
|
||||
|
|
|
|||
Loading…
Reference in a new issue