This commit is contained in:
tiago.kayaya
2021-01-20 13:38:11 +01:00
parent b901b12a6b
commit 937a0663f2
52 changed files with 301 additions and 370 deletions
@@ -576,9 +576,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var _this4 = this;
this.showLoader = true;
this.result = this.chatService.getAllDirectMessages().subscribe(function (res) {
_this4.userDirectMessages = res.ims;
console.log(res);
/* this.result = */
this.chatService.getAllDirectMessages().subscribe(function (res) {
console.log(res.ims);
_this4.userDirectMessages = res.ims.sort(function (a, b) {
var dateA = new Date(a.lastMessage._updatedAt).getTime();
var dateB = new Date(b.lastMessage._updatedAt).getTime();
return dateB - dateB;
});
console.log(_this4.userDirectMessages);
_this4.showLoader = false;
});
}