more clean

This commit is contained in:
MathieuG-P
2022-07-19 21:29:01 +02:00
parent 7ab30eaadc
commit 4dbc30d521
@@ -17,9 +17,9 @@ export class NotificationService{
}
public notify(notification: Notification): Promise<NotificationResult|string>{
let resovableNotification: ResolvableNotification;
let resovableNotification: ResolvableNotification = {id: uuidv4(), notification: notification, resolver: null };
const promise = new Promise<NotificationResult|string>(resolve => {
resovableNotification = {id: uuidv4(), notification: notification, resolver: resolve }
resovableNotification.resolver = resolve;
setTimeout(() => resolve(NotificationResult.NO_CHOICE), notification.duration || 7000);
});