@@ -220,12 +220,13 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
220220 } ,
221221
222222 jumpTopDisabled : function ( ) {
223- return ( this . get ( 'progressPosition' ) === 1 ) ;
224- } . property ( 'postStream.filteredPostsCount' , ' progressPosition') ,
223+ return ( this . get ( 'progressPosition' ) <= 3 ) ;
224+ } . property ( 'progressPosition' ) ,
225225
226226 jumpBottomDisabled : function ( ) {
227- return this . get ( 'progressPosition' ) >= this . get ( 'postStream.filteredPostsCount' ) ;
228- } . property ( 'postStream.filteredPostsCount' , 'progressPosition' ) ,
227+ return this . get ( 'progressPosition' ) >= this . get ( 'postStream.filteredPostsCount' ) ||
228+ this . get ( 'progressPosition' ) >= this . get ( 'highest_post_number' ) ;
229+ } . property ( 'postStream.filteredPostsCount' , 'highest_post_number' , 'progressPosition' ) ,
229230
230231 canMergeTopic : function ( ) {
231232 if ( ! this . get ( 'details.can_move_posts' ) ) return false ;
@@ -269,9 +270,9 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
269270
270271 streamPercentage : function ( ) {
271272 if ( ! this . get ( 'postStream.loaded' ) ) { return 0 ; }
272- if ( this . get ( 'postStream.filteredPostsCount ' ) === 0 ) { return 0 ; }
273- return this . get ( 'progressPosition' ) / this . get ( 'postStream.filteredPostsCount ' ) ;
274- } . property ( 'postStream.loaded' , 'progressPosition' , 'postStream.filteredPostsCount ' ) ,
273+ if ( this . get ( 'postStream.highest_post_number ' ) === 0 ) { return 0 ; }
274+ return this . get ( 'progressPosition' ) / this . get ( 'highest_post_number ' ) ;
275+ } . property ( 'postStream.loaded' , 'progressPosition' , 'highest_post_number ' ) ,
275276
276277 multiSelectChanged : function ( ) {
277278 // Deselect all posts when multi select is turned off
0 commit comments