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

@@ -22,11 +22,11 @@ export class SubscriptionsComponent implements OnInit {
constructor(private dialog: MatDialog, public postsService: PostsService, private router: Router, private snackBar: MatSnackBar) { }
ngOnInit() {
if (this.postsService.config) {
if (this.postsService.initialized) {
this.getSubscriptions();
}
this.postsService.config_reloaded.subscribe(changed => {
if (changed) {
this.postsService.service_initialized.subscribe(init => {
if (init) {
this.getSubscriptions();
}
});