mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-28 23:50:59 +03:00
potentially made it so saved settings get applied with no reload in most situations
This commit is contained in:
@@ -55,6 +55,20 @@ export class AppComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
this.loadConfig();
|
||||
this.postsService.settings_changed.subscribe(changed => {
|
||||
if (changed) {
|
||||
this.loadConfig();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
toggleSidenav() {
|
||||
this.sidenav.toggle();
|
||||
}
|
||||
|
||||
loadConfig() {
|
||||
// loading config
|
||||
this.postsService.loadNavItems().subscribe(res => { // loads settings
|
||||
const result = !this.postsService.debugMode ? res['config_file'] : res;
|
||||
@@ -71,11 +85,6 @@ export class AppComponent implements OnInit {
|
||||
}, error => {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
toggleSidenav() {
|
||||
this.sidenav.toggle();
|
||||
}
|
||||
|
||||
// theme stuff
|
||||
|
||||
Reference in New Issue
Block a user