sort folders by name first and then sequence (#5063)

* sort folders by name first and then sequence
---------

Co-authored-by: lohit <lohit@usebruno.com>
This commit is contained in:
lohit
2025-07-14 22:17:11 +05:30
committed by GitHub
parent 31e555812c
commit 4e4c94d73f
13 changed files with 537 additions and 94 deletions

View File

@@ -326,14 +326,14 @@ const addDirectory = async (win, pathname, collectionUid, collectionPath) => {
}
let name = path.basename(pathname);
let seq = 1;
let seq;
const folderBruFilePath = path.join(pathname, `folder.bru`);
if (fs.existsSync(folderBruFilePath)) {
let folderBruFileContent = fs.readFileSync(folderBruFilePath, 'utf8');
let folderBruData = await collectionBruToJson(folderBruFileContent);
name = folderBruData?.meta?.name || name;
seq = folderBruData?.meta?.seq || seq;
seq = folderBruData?.meta?.seq;
}
const directory = {