Message List: Fix outgoing message sometimes not being scrolled to
This commit is contained in:
parent
b97114d6c8
commit
4d7db1afe2
@ -77,6 +77,7 @@ export function init(_onUpdate: OnApiUpdate) {
|
||||
export async function fetchMessages({
|
||||
chat,
|
||||
threadId,
|
||||
offsetId,
|
||||
...pagination
|
||||
}: {
|
||||
chat: ApiChat;
|
||||
@ -94,6 +95,10 @@ export async function fetchMessages({
|
||||
...(threadId !== MAIN_THREAD_ID && {
|
||||
msgId: threadId,
|
||||
}),
|
||||
...(offsetId && {
|
||||
// Workaround for local message IDs overflowing some internal `Buffer` range check
|
||||
offsetId: Math.min(offsetId, 2 ** (32 - 1) - 1),
|
||||
}),
|
||||
...pagination,
|
||||
}), undefined, true);
|
||||
} catch (err: any) {
|
||||
@ -1127,7 +1132,7 @@ export async function loadPollOptionResults({
|
||||
|
||||
export async function fetchExtendedMedia({
|
||||
chat, ids,
|
||||
} : {
|
||||
}: {
|
||||
chat: ApiChat;
|
||||
ids: number[];
|
||||
}) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user