forked from Archives/Athou_commafeed
initial expanded view support (#62)
This commit is contained in:
@@ -352,13 +352,13 @@ function($scope, $http, $state, $stateParams, $route, $location,
|
||||
|
||||
$scope.session = ProfileService.get();
|
||||
$scope.ServerService = ServerService.get();
|
||||
|
||||
$scope.settingsService = SettingsService;
|
||||
|
||||
$scope.loading = true;
|
||||
$scope.$watch(totalActiveAjaxRequests, function() {
|
||||
$scope.loading = (totalActiveAjaxRequests() !== 0);
|
||||
});
|
||||
|
||||
$scope.settingsService = SettingsService;
|
||||
|
||||
$scope.$watch('settingsService.settings.readingMode', function(
|
||||
newValue, oldValue) {
|
||||
if (newValue && oldValue && newValue != oldValue) {
|
||||
@@ -371,6 +371,12 @@ function($scope, $http, $state, $stateParams, $route, $location,
|
||||
SettingsService.save();
|
||||
}
|
||||
});
|
||||
$scope.$watch('settingsService.settings.viewMode', function(
|
||||
newValue, oldValue) {
|
||||
if (newValue && oldValue && newValue != oldValue) {
|
||||
SettingsService.save();
|
||||
}
|
||||
});
|
||||
$scope.refresh = function() {
|
||||
if($stateParams._type == 'feed'){
|
||||
FeedService.refresh({
|
||||
@@ -404,10 +410,9 @@ function($scope, $http, $state, $stateParams, $route, $location,
|
||||
|
||||
$scope.toggleOrder = function() {
|
||||
var settings = $scope.settingsService.settings;
|
||||
settings.readingOrder = settings.readingOrder == 'asc' ? 'desc'
|
||||
: 'asc';
|
||||
settings.readingOrder = settings.readingOrder == 'asc' ? 'desc' : 'asc';
|
||||
};
|
||||
|
||||
|
||||
$scope.toAdmin = function() {
|
||||
$location.path('admin');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user