Update usage of app title

This commit is contained in:
SondreB 2023-01-15 03:35:32 +01:00
parent bc7353c976
commit 7851edc956
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF
13 changed files with 12 additions and 14 deletions

View File

@ -13,7 +13,7 @@ export class AboutComponent {
ngOnInit() {
this.appState.showBackButton = true;
this.appState.title = 'About';
this.appState.updateTitle('About');
this.appState.actions = [];
}
}

View File

@ -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) => `<pre>${data.replace(/</g, '&lt;').replace(/>/g, '&gt;')}</pre>`;

View File

@ -81,7 +81,6 @@ export class AppComponent {
}
}
// appState.title = 'Blockcore Notes';
this.authService.authInfo$.subscribe(async (auth) => {
auth.publicKeyHex;

View File

@ -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 = [];
}

View File

@ -230,7 +230,7 @@ export class CirclesComponent {
}
async ngOnInit() {
this.appState.title = 'Circles';
this.appState.updateTitle('Circles');
this.appState.showBackButton = false;
this.appState.actions = [
{

View File

@ -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(

View File

@ -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;

View File

@ -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 = [
{

View File

@ -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}`);
})
);

View File

@ -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 = [
{

View File

@ -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.

View File

@ -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 = [];
}

View File

@ -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) => {