From 7851edc956a218d268adc0922b38cb4b37870442 Mon Sep 17 00:00:00 2001 From: SondreB Date: Sun, 15 Jan 2023 03:35:32 +0100 Subject: [PATCH] Update usage of app title --- src/app/about/about.ts | 2 +- src/app/about/licenses/licenses.ts | 2 +- src/app/app.ts | 1 - src/app/chat/chat.ts | 2 +- src/app/circles/circles.ts | 2 +- src/app/feed-private/feed-private.ts | 2 +- src/app/feed-public/feed-public.ts | 2 +- src/app/feed/feed.ts | 2 +- src/app/followers/followers.ts | 2 +- src/app/home/home.ts | 2 +- src/app/note/note.ts | 3 +-- src/app/notes/notes.ts | 2 +- src/app/user/user.ts | 2 +- 13 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/app/about/about.ts b/src/app/about/about.ts index 3035f78..553209a 100644 --- a/src/app/about/about.ts +++ b/src/app/about/about.ts @@ -13,7 +13,7 @@ export class AboutComponent { ngOnInit() { this.appState.showBackButton = true; - this.appState.title = 'About'; + this.appState.updateTitle('About'); this.appState.actions = []; } } diff --git a/src/app/about/licenses/licenses.ts b/src/app/about/licenses/licenses.ts index 5a4f839..825a53a 100644 --- a/src/app/about/licenses/licenses.ts +++ b/src/app/about/licenses/licenses.ts @@ -17,7 +17,7 @@ export class LicensesComponent { ngOnInit() { this.appState.showBackButton = true; - this.appState.title = 'Licenses'; + this.appState.updateTitle('Licenses'); this.appState.actions = []; const dataFormatter = (data: string) => `
${data.replace(//g, '>')}
`; diff --git a/src/app/app.ts b/src/app/app.ts index 41de854..1b0062b 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -81,7 +81,6 @@ export class AppComponent { } } - // appState.title = 'Blockcore Notes'; this.authService.authInfo$.subscribe(async (auth) => { auth.publicKeyHex; diff --git a/src/app/chat/chat.ts b/src/app/chat/chat.ts index d41a1f3..7c6c50f 100644 --- a/src/app/chat/chat.ts +++ b/src/app/chat/chat.ts @@ -9,7 +9,7 @@ export class ChatComponent { constructor(private appState: ApplicationState) {} async ngOnInit() { - this.appState.title = 'Chat'; + this.appState.updateTitle('Chat'); this.appState.goBack = true; this.appState.actions = []; } diff --git a/src/app/circles/circles.ts b/src/app/circles/circles.ts index 2d3162e..5d75166 100644 --- a/src/app/circles/circles.ts +++ b/src/app/circles/circles.ts @@ -230,7 +230,7 @@ export class CirclesComponent { } async ngOnInit() { - this.appState.title = 'Circles'; + this.appState.updateTitle('Circles'); this.appState.showBackButton = false; this.appState.actions = [ { diff --git a/src/app/feed-private/feed-private.ts b/src/app/feed-private/feed-private.ts index 79aab22..daf3ccc 100644 --- a/src/app/feed-private/feed-private.ts +++ b/src/app/feed-private/feed-private.ts @@ -135,7 +135,7 @@ export class FeedPrivateComponent { hasFollowers = false; async ngOnInit() { - this.appState.title = 'Following Notes'; + this.appState.updateTitle('Following Notes'); this.options.options.privateFeed = true; this.subscriptions.push( diff --git a/src/app/feed-public/feed-public.ts b/src/app/feed-public/feed-public.ts index 37a197a..47ee442 100644 --- a/src/app/feed-public/feed-public.ts +++ b/src/app/feed-public/feed-public.ts @@ -284,7 +284,7 @@ export class FeedPublicComponent { // useReactiveContext // New construct in Angular 14 for subscription. // https://medium.com/generic-ui/the-new-way-of-subscribing-in-an-angular-component-f74ef79a8ffc - this.appState.title = ''; + this.appState.updateTitle(''); if (this.relay) { return; diff --git a/src/app/feed/feed.ts b/src/app/feed/feed.ts index 774caa9..9b5ace6 100644 --- a/src/app/feed/feed.ts +++ b/src/app/feed/feed.ts @@ -169,7 +169,7 @@ export class FeedComponent { // useReactiveContext // New construct in Angular 14 for subscription. // https://medium.com/generic-ui/the-new-way-of-subscribing-in-an-angular-component-f74ef79a8ffc - this.appState.title = ''; + this.appState.updateTitle(''); this.appState.showBackButton = false; this.appState.actions = [ { diff --git a/src/app/followers/followers.ts b/src/app/followers/followers.ts index fe95292..2572d2e 100644 --- a/src/app/followers/followers.ts +++ b/src/app/followers/followers.ts @@ -24,7 +24,7 @@ export class FollowersComponent { this.subscriptions.push( this.ui.profile$.subscribe((profile) => { - this.appState.title = `@${profile?.name}`; + this.appState.updateTitle(`@${profile?.name}`); }) ); diff --git a/src/app/home/home.ts b/src/app/home/home.ts index 7211168..eb7f4c3 100644 --- a/src/app/home/home.ts +++ b/src/app/home/home.ts @@ -491,7 +491,7 @@ export class HomeComponent { // useReactiveContext // New construct in Angular 14 for subscription. // https://medium.com/generic-ui/the-new-way-of-subscribing-in-an-angular-component-f74ef79a8ffc - this.appState.title = ''; + this.appState.updateTitle(''); this.appState.showBackButton = false; this.appState.actions = [ { diff --git a/src/app/note/note.ts b/src/app/note/note.ts index 13ed486..88c1539 100644 --- a/src/app/note/note.ts +++ b/src/app/note/note.ts @@ -108,9 +108,8 @@ export class NoteComponent { } console.log('NG INIT ON NOTE:'); - // this.appState.title = 'Blockcore Notes'; - this.appState.title = 'Thread'; + this.appState.updateTitle('Thread'); this.appState.showBackButton = true; // Subscribe to the event which will update whenever user requests to view a different event. diff --git a/src/app/notes/notes.ts b/src/app/notes/notes.ts index 341a948..df1a0f8 100644 --- a/src/app/notes/notes.ts +++ b/src/app/notes/notes.ts @@ -25,7 +25,7 @@ export class NotesComponent { } ngOnInit() { - this.appState.title = 'Saved Notes'; + this.appState.updateTitle('Saved Notes'); this.appState.goBack = true; this.appState.actions = []; } diff --git a/src/app/user/user.ts b/src/app/user/user.ts index 9167202..55a71f4 100644 --- a/src/app/user/user.ts +++ b/src/app/user/user.ts @@ -228,7 +228,7 @@ export class UserComponent { this.appState.showBackButton = true; this.appState.actions = []; - this.appState.title = ''; + this.appState.updateTitle(''); this.subscriptions.push( this.activatedRoute.queryParams.subscribe(async (params) => {