1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

[PM-6426] Refactoring small detail for how we identify the clear clipboard timeout in SystemService

This commit is contained in:
Cesar Gonzalez 2024-04-01 16:00:50 -05:00
parent 338042b0e4
commit f52849d159
No known key found for this signature in database
GPG Key ID: 3381A5457F8CCECF

View File

@ -97,7 +97,6 @@ export class SystemService implements SystemServiceAbstraction {
}
async clearClipboard(clipboardValue: string, timeoutMs: number = null): Promise<void> {
let taskTimeoutInMs = timeoutMs;
await this.taskSchedulerService.clearScheduledTask({
taskName: ScheduledTaskNames.systemClearClipboardTimeout,
timeoutId: this.clearClipboardTimeout,
@ -107,6 +106,7 @@ export class SystemService implements SystemServiceAbstraction {
return;
}
let taskTimeoutInMs = timeoutMs;
if (!taskTimeoutInMs) {
const clearClipboardDelayInSeconds = await firstValueFrom(
this.autofillSettingsService.clearClipboardDelay$,