mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Prevent toast interval from never completing
This commit is contained in:
parent
fb243abdfe
commit
d4e6f6dc17
@ -40,7 +40,7 @@ export class ToastComponent {
|
|||||||
const delay = toast.delay - 500 // for fade animation
|
const delay = toast.delay - 500 // for fade animation
|
||||||
|
|
||||||
interval(refreshInterval)
|
interval(refreshInterval)
|
||||||
.pipe(take(delay / refreshInterval))
|
.pipe(take(Math.round(delay / refreshInterval)))
|
||||||
.subscribe((count) => {
|
.subscribe((count) => {
|
||||||
toast.delayRemaining = Math.max(
|
toast.delayRemaining = Math.max(
|
||||||
0,
|
0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user