Browse Source

dismiss tweets if they time out

master
Aaron Parecki 6 years ago
parent
commit
7eb2736d60
No known key found for this signature in database GPG Key ID: 276C2817346D6056
2 changed files with 8 additions and 0 deletions
  1. +4
    -0
      public/js/app.js
  2. +4
    -0
      resources/assets/js/components/TweetQueue.vue

+ 4
- 0
public/js/app.js View File

@ -46532,6 +46532,10 @@ module.exports = {
Echo.channel('tweet-queue').listen('NewTweetEvent', function (e) {
if (_this.findTweetInQueue(e.tweet_id) === false) {
_this.queue.push(e);
// If the new tweet is one that timed out, dismiss it
if (_this.show && _this.tweet.tweet_id == e.tweet_id) {
_this.dismissTweet();
}
}
}).listen('TweetClaimedEvent', function (e) {
_this.removeTweetFromQueue(e.tweet_id);

+ 4
- 0
resources/assets/js/components/TweetQueue.vue View File

@ -44,6 +44,10 @@ module.exports = {
.listen('NewTweetEvent', (e) => {
if(this.findTweetInQueue(e.tweet_id) === false) {
this.queue.push(e);
// If the new tweet is one that timed out, dismiss it
if(this.show && this.tweet.tweet_id == e.tweet_id) {
this.dismissTweet();
}
}
})
.listen('TweetClaimedEvent', (e) => {

Loading…
Cancel
Save