From fa6765a79f29106f137e01d5fb1894cef79cdc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Sch=C3=A4ffner-Gurney?= Date: Tue, 17 Nov 2015 12:10:48 -0500 Subject: [PATCH] fixed zero state appearing with selected collection after refreshing collection list in sidebar --- src/home/index.js | 11 ++++++----- src/home/index.less | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/home/index.js b/src/home/index.js index c461843989b..a6d786187b6 100644 --- a/src/home/index.js +++ b/src/home/index.js @@ -64,13 +64,14 @@ var HomeView = View.extend({ this.renderSubview(new TourView(), this.queryByHook('tour-container')); }, onInstanceFetched: function() { - if (app.instance.collections.length === 0) { - this.showNoCollectionsZeroState = true; - } else { - this.showDefaultZeroState = true; - } if (!this.ns) { app.instance.collections.unselectAll(); + + if (app.instance.collections.length === 0) { + this.showNoCollectionsZeroState = true; + } else { + this.showDefaultZeroState = true; + } } else { this.showCollection(app.instance.collections.get(this.ns)); } diff --git a/src/home/index.less b/src/home/index.less index 676559ec85c..569643c4152 100644 --- a/src/home/index.less +++ b/src/home/index.less @@ -91,8 +91,8 @@ display: flex; overflow: hidden; height: 100vh; - margin-top: -168px; // total computed header + .refine-view-container height - padding-top: 168px; // total computed header + .refine-view-container height + margin-top: -155px; // total computed header + .refine-view-container height + padding-top: 155px; // total computed header + .refine-view-container height position: relative; width: 100%; }