reduce msgs per page to 20
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user