Refactored initialization process to better facilitate auth if necessary

Date in user profile dialog now shows date
This commit is contained in:
Tzahi12345
2020-04-30 13:28:58 -04:00
parent 31f581c642
commit 81b0ef4a72
6 changed files with 25 additions and 16 deletions

View File

@@ -196,7 +196,6 @@ export class MainComponent implements OnInit {
selectedQuality = '';
formats_loading = false;
config_loaded = false;
@ViewChild('urlinput', { read: ElementRef }) urlInput: ElementRef;
@ViewChildren('audiofilecard') audioFileCards: QueryList<FileCardComponent>;
@@ -295,12 +294,11 @@ export class MainComponent implements OnInit {
// app initialization.
ngOnInit() {
if (this.postsService.config) {
if (this.postsService.initialized) {
this.configLoad();
} else {
this.postsService.config_reloaded.subscribe(changed => {
if (changed && !this.config_loaded) {
this.config_loaded = true;
this.postsService.service_initialized.subscribe(init => {
if (init) {
this.configLoad();
}
});