Skip to content

Commit

Permalink
Retain message list when sending messsages (do not collapse Load More…
Browse files Browse the repository at this point in the history
… results)
  • Loading branch information
f-r00t committed Feb 26, 2024
1 parent 7d0fa89 commit 2d6b1fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ export class GroupChatScreenNoTranslation extends React.Component {

Globals.updateGroupsFunctions.push(async () => {
this.setState({
messages: await getGroupMessages(this.state.key)
messages: await getGroupMessages(this.state.key, this.state.messages.length)
})
});

Expand Down Expand Up @@ -1047,7 +1047,7 @@ export class GroupChatScreenNoTranslation extends React.Component {
Keyboard.dismiss();
this.state.input.current._textInput.clear();

let updated_messages = await getGroupMessages(this.state.key);
let updated_messages = await getGroupMessages(this.state.key, this.state.messages.length);
if (!updated_messages) {
updated_messages = [];
}
Expand All @@ -1074,7 +1074,7 @@ export class GroupChatScreenNoTranslation extends React.Component {

if (result.success) {

updated_messages = await getGroupMessages(this.state.key);
updated_messages = await getGroupMessages(this.state.key, this.state.messages.length);
this.setState({
messages: updated_messages,
messageHasLength: false,
Expand All @@ -1083,7 +1083,7 @@ export class GroupChatScreenNoTranslation extends React.Component {


} else {
updated_messages = await getGroupMessages(this.state.key);
updated_messages = await getGroupMessages(this.state.key, this.state.messages.length);
updated_messages.push({
address: Globals.wallet.getPrimaryAddress(),
nickname: Globals.preferences.nickname,
Expand Down Expand Up @@ -1196,7 +1196,7 @@ export class GroupChatScreenNoTranslation extends React.Component {
fontSize: 12,
fontFamily: 'Montserrat-Bold'
}}>

{t('loadMore')}

</Text>
Expand Down

0 comments on commit 2d6b1fc

Please sign in to comment.