Skip to content

Commit

Permalink
FIX: Back button mobile from user activity stream
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed May 25, 2015
1 parent ee129ed commit 3437513
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion app/assets/javascripts/discourse/routes/user-index.js.es6
@@ -1,7 +1,14 @@
export default Discourse.Route.extend({

beforeModel: function() {
this.transitionTo('userActivity');
// HACK: Something with the way the user card intercepts clicks seems to break how the
// transition into a user's activity works. This makes the back button work on mobile
// where there is no user card as well as desktop where there is.
if (Discourse.Mobile.mobileView) {
this.replaceWith('userActivity');
} else {
this.transitionTo('userActivity');
}
}

});
Expand Up @@ -16,13 +16,13 @@
{{topic-list
showPosters=true
currentUser=currentUser
hideCategory=hideCategory
topics=topics}}
hideCategory=model.hideCategory
topics=model.topics}}
{{/if}}
</div>

<footer class='topic-list-bottom'>
{{conditional-loading-spinner condition=loadingMore}}
{{conditional-loading-spinner condition=model.loadingMore}}
{{#if allLoaded}}
{{#if showDismissRead}}
<button title="{{i18n 'topics.bulk.dismiss_topics_tooltip'}}" id='dismiss-topics' class='btn dismiss-read' {{action "dismissRead" "topics"}}>{{i18n 'topics.bulk.dismiss_topics'}}</button>
Expand Down

0 comments on commit 3437513

Please sign in to comment.