FIX: Back button mobile from user activity stream

This commit is contained in:
Robin Ward 2015-05-25 13:40:46 -04:00
parent ee129edf25
commit 3437513025
2 changed files with 11 additions and 4 deletions

View File

@ -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');
}
}
});

View File

@ -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>