mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-18 02:41:15 +02: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> {
|
async clearClipboard(clipboardValue: string, timeoutMs: number = null): Promise<void> {
|
||||||
let taskTimeoutInMs = timeoutMs;
|
|
||||||
await this.taskSchedulerService.clearScheduledTask({
|
await this.taskSchedulerService.clearScheduledTask({
|
||||||
taskName: ScheduledTaskNames.systemClearClipboardTimeout,
|
taskName: ScheduledTaskNames.systemClearClipboardTimeout,
|
||||||
timeoutId: this.clearClipboardTimeout,
|
timeoutId: this.clearClipboardTimeout,
|
||||||
@ -107,6 +106,7 @@ export class SystemService implements SystemServiceAbstraction {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let taskTimeoutInMs = timeoutMs;
|
||||||
if (!taskTimeoutInMs) {
|
if (!taskTimeoutInMs) {
|
||||||
const clearClipboardDelayInSeconds = await firstValueFrom(
|
const clearClipboardDelayInSeconds = await firstValueFrom(
|
||||||
this.autofillSettingsService.clearClipboardDelay$,
|
this.autofillSettingsService.clearClipboardDelay$,
|
||||||
|
Loading…
Reference in New Issue
Block a user