Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into export-conversations
This commit is contained in:
commit
8786c97cdb
118 changed files with 4704 additions and 1573 deletions
|
@ -62,7 +62,7 @@ export default abstract class Exporter {
|
|||
const stateRes: any[] = [];
|
||||
while (limit) {
|
||||
const eventsPerCrawl = Math.min(limit, 100);
|
||||
const res = await client._createMessagesRequest(this.room.roomId, prevToken, eventsPerCrawl, "b");
|
||||
const res: any = await client.createMessagesRequest(this.room.roomId, prevToken, eventsPerCrawl, "b");
|
||||
|
||||
if (res.state) stateRes.push(...res.state);
|
||||
if (res.chunk.length === 0) break;
|
||||
|
|
|
@ -73,3 +73,14 @@ export function copyNode(ref: Element): boolean {
|
|||
selectText(ref);
|
||||
return document.execCommand('copy');
|
||||
}
|
||||
|
||||
|
||||
const collator = new Intl.Collator();
|
||||
/**
|
||||
* Performant language-sensitive string comparison
|
||||
* @param a the first string to compare
|
||||
* @param b the second string to compare
|
||||
*/
|
||||
export function compare(a: string, b: string): number {
|
||||
return collator.compare(a, b);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue