When viewing yourself, default to activity, not summary.

This commit is contained in:
Robin Ward 2017-03-07 12:02:28 -05:00
parent 0661cebbcf
commit 42fd4f987e
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ export default {
if (currentUser) { if (currentUser) {
const username = currentUser.get('username'); const username = currentUser.get('username');
DiscourseURL.rewrite(new RegExp(`^/users/${username}/?$`, "i"), `/users/${username}/summary`); DiscourseURL.rewrite(new RegExp(`^/users/${username}/?$`, "i"), `/users/${username}/activity`);
} }
DiscourseURL.rewrite(/^\/users\/([^\/]+)\/?$/, "/users/$1/activity"); DiscourseURL.rewrite(/^\/users\/([^\/]+)\/?$/, "/users/$1/activity");

View File

@ -4,7 +4,7 @@ export default Discourse.Route.extend({
const { currentUser } = this; const { currentUser } = this;
const viewingMe = (currentUser && currentUser.get('username') === this.modelFor('user').get('username')); const viewingMe = (currentUser && currentUser.get('username') === this.modelFor('user').get('username'));
const destination = viewingMe ? 'user.summary' : 'userActivity'; const destination = viewingMe ? 'userActivity' : 'user.summary';
// HACK: Something with the way the user card intercepts clicks seems to break how the // 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 // transition into a user's activity works. This makes the back button work on mobile