[mobile] Fix comments

This commit is contained in:
JuliaSvinareva 2021-03-04 20:24:35 +03:00
parent e8749b09d6
commit 0f2a4d8138
2 changed files with 5 additions and 3 deletions

View file

@ -113,9 +113,9 @@ class CommentsController extends Component {
let user = this.usersStore.searchUserById(data.asc_getUserId());
comment.comment = data.asc_getText();
comment.userid = data.asc_getUserId();
comment.userId = data.asc_getUserId();
comment.userName = data.asc_getUserName();
comment.usercolor = (user) ? user.asc_getColor() : null;
comment.userColor = (user) ? user.asc_getColor() : null;
comment.resolved = data.asc_getSolved();
comment.quote = data.asc_getQuoteText();
comment.time = date.getTime();

View file

@ -45,10 +45,12 @@ export class storeUsers {
}
searchUserById (id) {
let user = null;
this.users.forEach((item) => {
if (item.asc_getIdOriginal() === id) {
return item;
user = item;
}
});
return user;
}
}