Skip to content

Commit

Permalink
Merge pull request #43 from jesusoterogomez/fix/42/show_queue/1
Browse files Browse the repository at this point in the history
Fix/42/show queue/1
  • Loading branch information
jesusoterogomez authored Aug 23, 2017
2 parents 194360c + 149dd9e commit 1fa0a0c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

## [0.3.2] - 2017-08-23
- [\#42] Show queue was not working due to references to non existing variables
- [\#41] Fixed warning when using `color` property.

## [0.3.1] - 2017-08-07
### Added
- [\#19] Support for rendering React elements inside toasts
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-notify-toast",
"title": "React Notify Toast",
"version": "0.3.1",
"version": "0.3.2",
"description": "Toast notifications for React.js",
"keywords": ["react", "toast", "notification", "component", "notify"],
"author": "Jesús Otero <hello@jesusoterogomez.com>",
Expand Down
4 changes: 2 additions & 2 deletions src/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function createShowQueue(initialRecallDelay = 500, recallDelayIncrement = 500) {
if (show(current.text, current.type, current.timeout, current.color)) {
this.currentRecallDelay = initialRecallDelay;
if (current.timeout > 0) {
setTimeout(() => this.showNotify(), current.timeout + animationDuration);
setTimeout(() => this.showNotify(), current.timeout + defaults.animationDuration);
}
} else {
// If message show failed, re-add the current message to the front of the queue
Expand All @@ -100,7 +100,7 @@ function createShowQueue(initialRecallDelay = 500, recallDelayIncrement = 500) {
}
};

return (text, type = '', timeout = defaults.timeout, color = colorWhite) => {
return (text, type = '', timeout = defaults.timeout, color) => {
this.msgs.push({text, type, timeout, color});
if (!this.isNotifying) {
this.showNotify();
Expand Down

0 comments on commit 1fa0a0c

Please sign in to comment.