From d97b2382e6a6c9643acd8d68a967d508fba64211 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 4 Dec 2015 17:19:54 -0500 Subject: [PATCH] Don't show placeholders on Android --- .../javascripts/discourse/controllers/topic.js.es6 | 11 +++++++++++ app/assets/javascripts/discourse/templates/topic.hbs | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index a6e098ee2d2..59c3a843388 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -34,6 +34,17 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { } }.observes('model.title', 'category'), + @computed('model.postStream.posts') + postsToRender() { + return this.capabilities.isAndroid ? this.get('model.postStream.posts') + : this.get('model.postStream.postsWithPlaceholders'); + }, + + @computed('model.postStream.loadingFilter') + androidLoading(loading) { + return this.capabilities.isAndroid && loading; + }, + @computed('model.postStream.summary') show_deleted: { set(value) { diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs index 6430a4ec5e4..ef0f07e4162 100644 --- a/app/assets/javascripts/discourse/templates/topic.hbs +++ b/app/assets/javascripts/discourse/templates/topic.hbs @@ -69,7 +69,7 @@ {{#unless model.postStream.loadingFilter}} {{cloaked-collection itemViewClass="post" defaultHeight="200" - content=model.postStream.postsWithPlaceholders + content=postsToRender slackRatio="15" loadingHTML="" preservesContext="true"