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:
parent
338042b0e4
commit
f52849d159
@ -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$,
|
||||
|
Loading…
Reference in New Issue
Block a user