From 3bcea62e8dcb4b5f2e45e6701725e904ad115676 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 9 Mar 2015 12:09:38 +0100 Subject: fix feed ordering and fix #744 --- js/build/app.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'js/build/app.js') diff --git a/js/build/app.js b/js/build/app.js index 5f299d8c9..472f1731a 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -107,10 +107,12 @@ app.config(["$routeProvider", "$provide", "$httpProvider", function ($routeProvi // check if a custom ordering is set if (type === FEED_TYPE.FEED) { var feed = FeedResource.getById(parameters.id); - if (feed.ordering === 1) { - parameters.oldestFirst = true; - } else if (feed.ordering === 2) { + + // on intial load, the feed ordering is undefined + if (feed === undefined || feed.ordering === 2) { parameters.oldestFirst = false; + } else if (feed.ordering === 1) { + parameters.oldestFirst = true; } } @@ -2013,6 +2015,7 @@ app.service('SettingsResource', ["$http", "BASE_URL", function ($http, BASE_URL) var input = $('input[ng-model="Navigation.feed.url"]'); input.val(subscription); + input.trigger('input'); // hacky way to focus because initial loading of a feed // steals the focus -- cgit v1.2.3