Performance: Inbox Paging / loading (#11157)

* load messages per conversation

* only sort ones in ui

*  add contributor to message

* fix correct message layout/message

* mugenScroll on chatMessages

* fix lint, no mugen-scroll, use own scroll handler

* fix height / margin of modal + use button to load more

* fix tests

* user data from inbox

* style "load earlier messages"

*  move mapMessage to the inbox api result / extract sentMessage of members-api-controller

* fix test back

* fix test

* keep last scroll position

* just set the Id of the returned message instead of all other properties

* fix add new messages (buttons were hidden) + load more

* item-mounted debounce to trigger the re-scrolling
This commit is contained in:
negue
2019-06-13 15:18:50 +02:00
committed by Matteo Pagliazzi
parent 5268bbb8a9
commit 5630e8cc8e
12 changed files with 355 additions and 115 deletions

View File

@@ -98,8 +98,14 @@ export function setUserStyles (newMessage, user) {
}
}
let contributorCopy = user.contributor;
if (contributorCopy && contributorCopy.toObject) {
contributorCopy = contributorCopy.toObject();
}
newMessage.contributor = contributorCopy;
newMessage.userStyles = userStyles;
newMessage.markModified('userStyles');
newMessage.markModified('userStyles contributor');
}
export function messageDefaults (msg, user, client, info = {}) {