FIX: Progress wasn't updating after becoming visible

This commit is contained in:
Robin Ward 2016-05-27 15:20:16 -04:00
parent eaf4c5b99e
commit 9609680ba9
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
1 changed files with 7 additions and 1 deletions

View File

@ -20,6 +20,13 @@ export default Ember.Component.extend({
return !userWantsToJump && showTimeline;
},
@observes('hidden')
visibilityChanged() {
if (!this.get('hidden')) {
this._updateBar();
}
},
keyboardTrigger(kbdEvent) {
if (kbdEvent.type === 'jump') {
this.set('expanded', true);
@ -46,7 +53,6 @@ export default Ember.Component.extend({
return progressPosition >= filteredPostsCount || progressPosition >= highestPostNumber;
},
@computed('postStream.loaded', 'topic.currentPost', 'postStream.filteredPostsCount')
hideProgress(loaded, currentPost, filteredPostsCount) {
return (!loaded) || (!currentPost) || (filteredPostsCount < 2);