reduce msgs per page to 20

This commit is contained in:
Samuel Newman
2026-04-28 17:38:42 +01:00
parent 738c57878d
commit 13a76f6a0c
+4 -2
View File
@@ -37,6 +37,8 @@ import {type MessagesEventBusError} from '#/state/messages/events/types'
import {logger} from '#/state/messages/logger' import {logger} from '#/state/messages/logger'
import {IS_NATIVE} from '#/env' import {IS_NATIVE} from '#/env'
const MESSAGES_PER_PAGE = IS_NATIVE ? 20 : 60
export function isConvoItemMessage( export function isConvoItemMessage(
item: ConvoItem, item: ConvoItem,
): item is ConvoItem & {type: 'message'} { ): item is ConvoItem & {type: 'message'} {
@@ -543,7 +545,7 @@ export class Convo {
{ {
cursor: nextCursor, cursor: nextCursor,
convoId: this.convoId, convoId: this.convoId,
limit: IS_NATIVE ? 30 : 60, limit: MESSAGES_PER_PAGE,
}, },
{headers: DM_SERVICE_HEADERS}, {headers: DM_SERVICE_HEADERS},
) )
@@ -571,7 +573,7 @@ export class Convo {
* If the response contained fewer messages than the limit, we know * If the response contained fewer messages than the limit, we know
* there are no more pages, regardless of whether a cursor was returned. * there are no more pages, regardless of whether a cursor was returned.
*/ */
if (messages.length < (IS_NATIVE ? 30 : 60)) { if (messages.length < MESSAGES_PER_PAGE) {
this.oldestRev = null this.oldestRev = null
} }