FIX: don't trigger header:hide-topic at the bottom on desktops

On mobile we trigger `header:hide-topic` at the very bottom of topics to switch the header contents back from small logo + topic info to large logo + user panels. 

Given that the `topic-progress` component is sometimes loaded on desktop - E.g composer is open or on narrow desktop screens - we need a guard to prevent this logic from firing on desktops.
This commit is contained in:
Joe 2018-11-23 10:14:13 +08:00 committed by GitHub
parent 7f7464e3e6
commit c4fca36255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -180,6 +180,10 @@ export default Ember.Component.extend({
}
// switch mobile scroll logo at the very bottom of topics
// not a mobile device so don't do anything
if (!this.site.mobileView) return;
const isIOS = this.capabilities.isIOS,
switchHeight = bodyHeight - offset - windowHeight,
appEvents = getOwner(this).lookup("app-events:main");