diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index cf26833..74d5aaa 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,4 +1,4 @@ -This is an Angular 20 project, make sure to always use signals and effects. Also always use most modern TypeScript, with async/await. +This is an Angular 19 project, make sure to always use signals and effects. Also always use most modern TypeScript, with async/await. Make sure to use new flow syntax of latest Angular, which is @if instead of *ngIf, @for instead of *ngFor, and @let instead of *ngLet. @@ -23,6 +23,8 @@ box-shadow: var(--mat-sys-level5) Never set the font-weight in CSS. The current font for headlines does not support different font weights. +Make sure you don't use outdated variables for Angular Material, such as "--mat-sys-color-surface-container-high" and "--mat-sys-color-primary-container" and "--mat-sys-color-on-primary-container". + I'm using a Windows computer, so make sure that paths and commands are compatible with Windows. When waiting for background terminal output for "npm start", wait another 3 extra seconds to ensure build completes. diff --git a/src/app/components/user-profile/user-profile.component.ts b/src/app/components/user-profile/user-profile.component.ts index 83d9294..5c18632 100644 --- a/src/app/components/user-profile/user-profile.component.ts +++ b/src/app/components/user-profile/user-profile.component.ts @@ -67,13 +67,16 @@ export class UserProfileComponent implements AfterViewInit, OnDestroy { constructor() { // Set up scroll detection - this.setupScrollDetection(); - - // Set up an effect to watch for changes to npub input + this.setupScrollDetection(); // Set up an effect to watch for changes to npub input effect(() => { const pubkey = this.pubkey(); if (pubkey) { + // If the pubkey changed, reset the profile data to force reload + if (this.publicKey && this.publicKey !== pubkey) { + this.profile.set(null); + } + this.publicKey = this.pubkey(); // console.debug('LOCATION 1:', pubkey); const npub = this.utilities.getNpubFromPubkey(pubkey); diff --git a/src/app/pages/messages/messages.component.html b/src/app/pages/messages/messages.component.html index 47f3c88..bc3384c 100644 --- a/src/app/pages/messages/messages.component.html +++ b/src/app/pages/messages/messages.component.html @@ -1,200 +1,245 @@