mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-22 12:40:56 +03:00
Refactored initialization process to better facilitate auth if necessary
Date in user profile dialog now shows date
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user