mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
have a default value for the readingMode setting
This commit is contained in:
@@ -104,15 +104,13 @@ module.controller('FeedListCtrl', function($scope, $routeParams, $http,
|
||||
$scope.hasMore = true;
|
||||
|
||||
$scope.refreshList = function() {
|
||||
if ($scope.settings.readingMode) {
|
||||
$scope.entryList = EntryService.get({
|
||||
type : $scope.selectedType,
|
||||
id : $scope.selectedId,
|
||||
readType : $scope.settings.readingMode,
|
||||
offset : 0,
|
||||
limit : 30
|
||||
});
|
||||
}
|
||||
$scope.entryList = EntryService.get({
|
||||
type : $scope.selectedType,
|
||||
id : $scope.selectedId,
|
||||
readType : $scope.settings.readingMode,
|
||||
offset : 0,
|
||||
limit : 30
|
||||
});
|
||||
};
|
||||
|
||||
$scope.loadMoreEntries = function() {
|
||||
@@ -122,8 +120,6 @@ module.controller('FeedListCtrl', function($scope, $routeParams, $http,
|
||||
return;
|
||||
if ($scope.busy)
|
||||
return;
|
||||
if (!$scope.settings.readingMode)
|
||||
return;
|
||||
$scope.busy = true;
|
||||
EntryService.get({
|
||||
type : $scope.selectedType,
|
||||
|
||||
@@ -118,8 +118,10 @@ module.factory('EntryService', [ '$resource', '$http',
|
||||
module.service('SettingsService', function($resource) {
|
||||
var s = {}
|
||||
s.settings = {};
|
||||
s.settings.readMode = 'unread';
|
||||
s.settings = $resource('rest/settings/get').get();
|
||||
s.settings.readingMode = 'unread';
|
||||
$resource('rest/settings/get').get(function(data) {
|
||||
s.settings.readingMode = data.readingMode;
|
||||
});
|
||||
s.save = function() {
|
||||
$resource('rest/settings/save').save(s.settings);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user