When viewing yourself, default to activity, not summary.
This commit is contained in:
parent
0661cebbcf
commit
42fd4f987e
|
@ -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");
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue