mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-13 07:48:37 +01:00
Request more messages for event-playback infinite scrolling
When the server supports draft/event-playback, some messages (like join/part/etc) may be collapsed together. Request more messages to avoid ending up with a half-filled page.
This commit is contained in:
parent
08cd94d775
commit
0888af4a6f
@ -1224,7 +1224,12 @@ export default class App extends Component {
|
||||
// Avoids sending multiple CHATHISTORY commands in parallel
|
||||
this.endOfHistory.set(buf.id, true);
|
||||
|
||||
client.fetchHistoryBefore(buf.name, before, 100).then((result) => {
|
||||
let limit = 100;
|
||||
if (client.enabledCaps["draft/event-playback"]) {
|
||||
limit = 200;
|
||||
}
|
||||
|
||||
client.fetchHistoryBefore(buf.name, before, limit).then((result) => {
|
||||
this.endOfHistory.set(buf.id, !result.more);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user