fix ordering of message with more recent at bottom of the view

pull/1387/head
Audric Ackermann 5 years ago
parent 3998bbc97d
commit b1cac5f01b
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -79,6 +79,7 @@
flex-grow: 1; flex-grow: 1;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%;
} }
.message-selection-overlay { .message-selection-overlay {

@ -285,7 +285,7 @@ export class SessionConversation extends React.Component<Props, State> {
} }
); );
const messages = messageSet.models; const messages = messageSet.models.reverse();
const messageFetchTimestamp = Date.now(); const messageFetchTimestamp = Date.now();
this.setState({ messages, messageFetchTimestamp }, () => { this.setState({ messages, messageFetchTimestamp }, () => {
@ -299,9 +299,7 @@ export class SessionConversation extends React.Component<Props, State> {
fetchInterval = Constants.CONVERSATION.MESSAGE_FETCH_INTERVAL fetchInterval = Constants.CONVERSATION.MESSAGE_FETCH_INTERVAL
) { ) {
const { conversationKey, messageFetchTimestamp } = this.state; const { conversationKey, messageFetchTimestamp } = this.state;
const conversationModel = window.ConversationController.get(
conversationKey
);
const timestamp = getTimestamp(); const timestamp = getTimestamp();
// If we have pulled messages in the last interval, don't bother rescanning // If we have pulled messages in the last interval, don't bother rescanning
@ -326,7 +324,7 @@ export class SessionConversation extends React.Component<Props, State> {
); );
// Set first member of series here. // Set first member of series here.
const messageModels = messageSet.models; const messageModels = messageSet.models.reverse();
const messages = []; const messages = [];
let previousSender; let previousSender;
for (let i = 0; i < messageModels.length; i++) { for (let i = 0; i < messageModels.length; i++) {

Loading…
Cancel
Save