mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
more clean
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user