Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

Commit

Permalink
Fix marked as read on scroll when collapsed
Browse files Browse the repository at this point in the history
  • Loading branch information
kasbah committed Jan 4, 2015
1 parent 2b63467 commit 9db1282
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/static/js/site.js
Expand Up @@ -794,8 +794,8 @@ goReadAppModule.controller('GoreadCtrl', function($scope, $http, $timeout, $wind
$scope.onScroll = _.debounce(function() {
$scope.$apply(function() {
$scope.applyGetFeed();
$scope.scrollRead();
$scope.collapsed = $(window).width() <= 768;
$scope.scrollRead();
$scope.checkLoadNextPage();
});
}, 100);
Expand Down Expand Up @@ -826,7 +826,8 @@ goReadAppModule.controller('GoreadCtrl', function($scope, $http, $timeout, $wind
$window.onresize = $scope.onScroll;

$scope.scrollRead = function() {
if (!$scope.opts.scrollRead || !$scope.opts.expanded) return;
if (!$scope.opts.scrollRead || !$scope.opts.expanded || scope.collapsed)
return;
var sl = $('#story-list');
var slh = sl.height();
var sle = sl[0];
Expand Down

0 comments on commit 9db1282

Please sign in to comment.