ng-notifications-bar icon indicating copy to clipboard operation
ng-notifications-bar copied to clipboard

Some of notifications stay forever

Open ggat opened this issue 9 years ago • 4 comments

When I show more than one notification, sometimes some of them stay forever even if hide : true. I know it might be little information but please try to reproduce. Thanks.

ggat avatar Sep 20 '16 14:09 ggat

I show multiple notifications at once and never encountered this issue, what does your code look like ?

kepoly avatar Sep 20 '16 14:09 kepoly

I am having the same issue as well unfortunately. @ggat did you browserify-shim ng-notifications-bar?

tonestrike avatar Oct 05 '16 18:10 tonestrike

I was able to solve this problem by manually setting a hide value to each notification instead of setting it in the config of the app. Not ideal, but not a huge deal either.

tonestrike avatar Oct 06 '16 22:10 tonestrike

Experiencing the same issue.

After taking a quick look at the code, this $timeout seems to be the source of the problem; the index used in Array.splice should be computed within the body of the $timeout, or you have a guaranteed race condition when a sufficient number of notifications are shown at the same time.

There seems to be another pull request (#49) that attempts to fix this, though I haven't tested it.

lextic avatar Oct 25 '16 19:10 lextic