Minor fixes. Link directoy to user activity to avoid a redirect.
This commit is contained in:
parent
e77ee1eaa8
commit
5d66f6ed8e
|
@ -13,9 +13,6 @@ Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
|||
// Whether the app has focus or not
|
||||
hasFocus: true,
|
||||
|
||||
// Are we currently scrolling?
|
||||
scrolling: false,
|
||||
|
||||
// Helps with integration tests
|
||||
URL_FIXTURES: {},
|
||||
|
||||
|
|
|
@ -249,6 +249,7 @@ Discourse.User = Discourse.Model.extend({
|
|||
|
||||
findDetails: function() {
|
||||
var user = this;
|
||||
|
||||
return PreloadStore.getAndRemove("user_" + user.get('username'), function() {
|
||||
return Discourse.ajax("/users/" + user.get('username') + '.json');
|
||||
}).then(function (json) {
|
||||
|
|
|
@ -17,7 +17,7 @@ Discourse.UserStream = Discourse.Model.extend({
|
|||
}.observes('filter'),
|
||||
|
||||
findItems: function() {
|
||||
var me = this;
|
||||
var userStream = this;
|
||||
if(this.get("loading")) { return Ember.RSVP.reject(); }
|
||||
this.set("loading",true);
|
||||
|
||||
|
@ -28,7 +28,7 @@ Discourse.UserStream = Discourse.Model.extend({
|
|||
|
||||
var stream = this;
|
||||
return Discourse.ajax(url, {cache: 'false'}).then( function(result) {
|
||||
me.set("loading",false);
|
||||
userStream.set("loading",false);
|
||||
if (result && result.user_actions) {
|
||||
var copy = Em.A();
|
||||
_.each(result.user_actions,function(action) {
|
||||
|
@ -38,7 +38,7 @@ Discourse.UserStream = Discourse.Model.extend({
|
|||
stream.get('content').pushObjects(copy);
|
||||
stream.set('itemsLoaded', stream.get('itemsLoaded') + result.user_actions.length);
|
||||
}
|
||||
}, function(){ me.set("loading", false); });
|
||||
}, function(){ userStream.set("loading", false); });
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
</li>
|
||||
<li class='current-user'>
|
||||
{{#if currentUser}}
|
||||
{{#titledLinkTo 'user' currentUser titleKey="current_user" class="icon"}}{{avatar currentUser imageSize="medium" }}{{/titledLinkTo}}
|
||||
{{#linkTo 'userActivity.index' currentUser titleKey="current_user" class="icon"}}{{avatar currentUser imageSize="medium" }}{{/linkTo}}
|
||||
{{else}}
|
||||
<div class="icon not-logged-in-avatar" {{action showLogin}}><i class='icon-user'></i></div>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue