From f14fff676e53b024e674b6705b41c17e31f88c91 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 20 Oct 2013 11:01:30 -0700 Subject: [PATCH] Fixed some UI issues Fixed: Add folder won't show loading when there aren't any folders --- src/UI/AddSeries/AddSeriesLayout.js | 5 ++++- src/UI/AddSeries/RootFolders/Layout.js | 2 +- src/UI/Commands/CommandController.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/UI/AddSeries/AddSeriesLayout.js b/src/UI/AddSeries/AddSeriesLayout.js index 23c21d2ed..1b778546d 100644 --- a/src/UI/AddSeries/AddSeriesLayout.js +++ b/src/UI/AddSeries/AddSeriesLayout.js @@ -37,7 +37,10 @@ define( initialize: function () { QualityProfileCollection.fetch(); - RootFolderCollection.fetch(); + RootFolderCollection.fetch() + .done(function () { + RootFolderCollection.synced = true; + }); }, onShow: function () { diff --git a/src/UI/AddSeries/RootFolders/Layout.js b/src/UI/AddSeries/RootFolders/Layout.js index 795f62edc..3b54c90a1 100644 --- a/src/UI/AddSeries/RootFolders/Layout.js +++ b/src/UI/AddSeries/RootFolders/Layout.js @@ -37,7 +37,7 @@ define( onRender: function () { this.currentDirs.show(new LoadingView()); - if (RootFolderCollection.any()) { + if (RootFolderCollection.synced) { this._showCurrentDirs(); } diff --git a/src/UI/Commands/CommandController.js b/src/UI/Commands/CommandController.js index 4bb78f011..60684bbf5 100644 --- a/src/UI/Commands/CommandController.js +++ b/src/UI/Commands/CommandController.js @@ -43,7 +43,7 @@ define( } }); - CommandCollection.bind('add sync', function () { + CommandCollection.bind('sync', function () { var command = CommandCollection.findCommand(options.command); if (command) { self._bindToCommandModel.call(self, command, options);