decord/source/modules/soundboard/useSoundOrganizer.tsx

45 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16380
// Function ID: 16381
2026-07-20 16:05:17 +00:00
// Name: sortSoundsOldestToNewestCreationDate
2026-07-29 08:29:29 +00:00
// Dependencies: [11, 2]
2026-07-20 16:05:17 +00:00
// Exports: useSoundOrganizer
2026-08-24 06:08:38 +00:00
// Module 16380 (sortSoundsOldestToNewestCreationDate)
import set from "set" /* 2 */;
2026-07-29 08:29:29 +00:00
function sortSoundsOldestToNewestCreationDate(value2) {
2026-07-20 16:05:17 +00:00
let flag = arg1;
if (arg1 === undefined) {
flag = true;
}
2026-07-29 08:29:29 +00:00
const items = [...value2];
const sorted = items.sort((soundId, soundId2) => callback(table[0]).compare(soundId.soundId, soundId2.soundId));
let sorted1 = sorted;
2026-07-20 16:05:17 +00:00
if (flag) {
2026-07-29 08:29:29 +00:00
const items1 = [];
HermesBuiltin.arraySpread(sorted, 0);
sorted1 = items1.sort((available, available2) => {
if (!available.available) {
let num2 = 0;
2026-07-20 16:05:17 +00:00
if (!available.available) {
2026-07-29 08:29:29 +00:00
num2 = 0;
if (available2.available) {
num2 = 1;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let num = num2;
} else {
num = -1;
}
return num;
});
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return sorted1;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/soundboard/useSoundOrganizer.tsx");
2026-07-20 16:05:17 +00:00
export { sortSoundsOldestToNewestCreationDate };
export function useSoundOrganizer() {
return sortSoundsOldestToNewestCreationDate;
}