mirror of
https://github.com/block-core/blockcore-notes.git
synced 2024-09-28 22:10:42 +00:00
Persist the show labels or not for sidemenu
This commit is contained in:
parent
3e544fb539
commit
2ec41d1e5f
@ -70,6 +70,8 @@ export class AppComponent {
|
||||
});
|
||||
}
|
||||
|
||||
this.displayLabels = !this.options.values.hideSideLabels;
|
||||
|
||||
// This must happen in the constructor on app component, or when loading in PWA, it won't
|
||||
// be possible to read the query parameters.
|
||||
const queryParam = globalThis.location.search;
|
||||
@ -110,6 +112,11 @@ export class AppComponent {
|
||||
this.displayLabels = !this.displayLabels;
|
||||
this.cd.detectChanges();
|
||||
|
||||
setTimeout(() => {
|
||||
this.options.values.hideSideLabels = !this.displayLabels;
|
||||
this.options.save();
|
||||
}, 250);
|
||||
|
||||
// this._container._ngZone.onMicrotaskEmpty.subscribe(() => {
|
||||
// this._container._updateStyles();
|
||||
// this._container._changeDetectorRef.markForCheck();
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { boolean } from 'joi';
|
||||
|
||||
export interface Options {
|
||||
hideSpam?: boolean;
|
||||
@ -11,6 +12,7 @@ export interface Options {
|
||||
showLines: boolean;
|
||||
showMediaPlayer?: boolean;
|
||||
enableSpotify?: boolean;
|
||||
hideSideLabels?: boolean;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
|
Loading…
Reference in New Issue
Block a user