Update last message on group call peek
This commit is contained in:
parent
1cc478180e
commit
a24bdc8bd3
2 changed files with 18 additions and 1 deletions
|
@ -43,7 +43,7 @@ import type {
|
||||||
ConversationChangedActionType,
|
ConversationChangedActionType,
|
||||||
ConversationRemovedActionType,
|
ConversationRemovedActionType,
|
||||||
} from './conversations';
|
} from './conversations';
|
||||||
import { getConversationCallMode } from './conversations';
|
import { getConversationCallMode, updateLastMessage } from './conversations';
|
||||||
import * as log from '../../logging/log';
|
import * as log from '../../logging/log';
|
||||||
import { strictAssert } from '../../util/assert';
|
import { strictAssert } from '../../util/assert';
|
||||||
import { waitForOnline } from '../../util/waitForOnline';
|
import { waitForOnline } from '../../util/waitForOnline';
|
||||||
|
@ -402,6 +402,8 @@ const doGroupCallPeek = (
|
||||||
peekInfo: formattedPeekInfo,
|
peekInfo: formattedPeekInfo,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
dispatch(updateLastMessage(conversationId));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1132,6 +1132,7 @@ export const actions = {
|
||||||
unblurAvatar,
|
unblurAvatar,
|
||||||
updateConversationModelSharedGroups,
|
updateConversationModelSharedGroups,
|
||||||
updateGroupAttributes,
|
updateGroupAttributes,
|
||||||
|
updateLastMessage,
|
||||||
updateSharedGroups,
|
updateSharedGroups,
|
||||||
verifyConversationsStoppingSend,
|
verifyConversationsStoppingSend,
|
||||||
};
|
};
|
||||||
|
@ -4433,6 +4434,20 @@ function maybeUpdateSelectedMessageForDetails(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function updateLastMessage(
|
||||||
|
conversationId: string
|
||||||
|
): ThunkAction<void, RootStateType, unknown, never> {
|
||||||
|
return async () => {
|
||||||
|
const conversationModel = window.ConversationController.get(conversationId);
|
||||||
|
if (conversationModel == null) {
|
||||||
|
throw new Error(
|
||||||
|
`updateLastMessage: Could not find conversation ${conversationId}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
await conversationModel.updateLastMessage();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function reducer(
|
export function reducer(
|
||||||
state: Readonly<ConversationsStateType> = getEmptyState(),
|
state: Readonly<ConversationsStateType> = getEmptyState(),
|
||||||
action: Readonly<
|
action: Readonly<
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue