From 0af9aed3d907f1019d34474f554dfb3aa9459ca8 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 23 Jan 2026 16:26:10 +0100 Subject: [PATCH] [PM-31158] Change default send to file for old ui (#18526) * Change default send to file for old ui * Trigger change detection to ensure signals are refreshed --- .../src/app/tools/send-v2/send-v2.component.ts | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/apps/desktop/src/app/tools/send-v2/send-v2.component.ts b/apps/desktop/src/app/tools/send-v2/send-v2.component.ts index 95c0c971d2c..0df71a78412 100644 --- a/apps/desktop/src/app/tools/send-v2/send-v2.component.ts +++ b/apps/desktop/src/app/tools/send-v2/send-v2.component.ts @@ -79,7 +79,6 @@ export class SendV2Component { protected readonly sendId = signal(null); protected readonly action = signal(Action.None); - private readonly selectedSendTypeOverride = signal(undefined); private sendFormConfigService = inject(DefaultSendFormConfigService); private sendItemsService = inject(SendItemsService); @@ -151,10 +150,9 @@ export class SendV2Component { protected readonly selectedSendType = computed(() => { const action = this.action(); - const typeOverride = this.selectedSendTypeOverride(); - if (action === Action.Add && typeOverride !== undefined) { - return typeOverride; + if (action === Action.Add) { + return undefined; } const sendId = this.sendId(); @@ -173,24 +171,20 @@ export class SendV2Component { } else { this.action.set(Action.Add); this.sendId.set(null); - this.selectedSendTypeOverride.set(type); - const component = this.addEditComponent(); - if (component) { - await component.resetAndLoad(); - } + this.cdr.detectChanges(); + void this.addEditComponent()?.resetAndLoad(); } } - /** Used by old UI to add a send without specifying type (defaults to Text) */ + /** Used by old UI to add a send without specifying type (defaults to File) */ protected async addSendWithoutType(): Promise { - await this.addSend(SendType.Text); + await this.addSend(SendType.File); } protected closeEditPanel(): void { this.action.set(Action.None); this.sendId.set(null); - this.selectedSendTypeOverride.set(undefined); } protected async savedSend(send: SendView): Promise {