Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop close on click when on timer #27

Merged
merged 3 commits into from
Aug 10, 2014
Merged

Conversation

willjk
Copy link

@willjk willjk commented Jul 17, 2014

Stop the message from closing on timeout when ttl is set. It will also display a timer of how much time is left before it closes.

@JanStevens
Copy link
Owner

I'm a bit confused, how would you use this practically?

EDIT: Is like a promise so you can do a then callback when the message closes?

@willjk
Copy link
Author

willjk commented Jul 17, 2014

$timeout creates a promise and this promise needs to be cancelled for the message not to close.

When you have the ttl set for the message to close automatically after say 2 seconds there was no way for a user to stop this. This enables the user to click on the message and stop the message from closing from the timer. You can still close the message with the X after the timer is stopped.

@JanStevens
Copy link
Owner

Haaa cool, so a user clicking on the message will keep the message until the user clicks on the close button.

Just a small question what happens if there is no close button on the message? (close button is disabled).

@willjk
Copy link
Author

willjk commented Jul 17, 2014

I didn't know this was an option ha.

I can change it so on the second click it will close the message.

OR

Make it so when the close button is disabled you cannot stop the message timer.

@JanStevens
Copy link
Owner

Hmm I think the best option is to allow your feature and remove it on a second click (if thats not to much to change).

Can you also update the README to reflect your changes?

Thanks for your contribution!

@willjk willjk closed this Jul 18, 2014
@willjk willjk reopened this Jul 18, 2014
@willjk
Copy link
Author

willjk commented Jul 18, 2014

I edited the Edit(future) feature to close on 2nd message click and updated the README

@JanStevens JanStevens merged commit ac305cd into JanStevens:master Aug 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants