From 42fd4f987ec822e0c475dc43436ba645a62e96b4 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 7 Mar 2017 12:02:28 -0500 Subject: [PATCH] When viewing yourself, default to activity, not summary. --- .../javascripts/discourse/initializers/url-redirects.js.es6 | 2 +- app/assets/javascripts/discourse/routes/user-index.js.es6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/initializers/url-redirects.js.es6 b/app/assets/javascripts/discourse/initializers/url-redirects.js.es6 index 4005acc77c4..b0e9c79c10b 100644 --- a/app/assets/javascripts/discourse/initializers/url-redirects.js.es6 +++ b/app/assets/javascripts/discourse/initializers/url-redirects.js.es6 @@ -15,7 +15,7 @@ export default { if (currentUser) { 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"); diff --git a/app/assets/javascripts/discourse/routes/user-index.js.es6 b/app/assets/javascripts/discourse/routes/user-index.js.es6 index 1301250006e..02347f714ff 100644 --- a/app/assets/javascripts/discourse/routes/user-index.js.es6 +++ b/app/assets/javascripts/discourse/routes/user-index.js.es6 @@ -4,7 +4,7 @@ export default Discourse.Route.extend({ const { currentUser } = this; 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 // transition into a user's activity works. This makes the back button work on mobile