Skip to content

Commit d44f344

Browse files
committed
Uses better variabel names in mergeSearchedCategorizedItems function
(#3543)
1 parent 52eeddf commit d44f344

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/plus/launchpad/launchpadProvider.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -645,39 +645,39 @@ export class LaunchpadProvider implements Disposable {
645645
}
646646

647647
mergeSearchedCategorizedItems(
648-
permanent: LaunchpadCategorizedResult,
649-
found: LaunchpadCategorizedResult | undefined,
648+
prsOfTheLaunchpad: LaunchpadCategorizedResult,
649+
prsOfSearch: LaunchpadCategorizedResult | undefined,
650650
): LaunchpadCategorizedResult {
651-
if (found == null || found?.error) {
652-
if (permanent.items == null) {
653-
return permanent;
651+
if (prsOfSearch == null || prsOfSearch?.error) {
652+
if (prsOfTheLaunchpad.items == null) {
653+
return prsOfTheLaunchpad;
654654
}
655655
return {
656-
items: permanent.items.filter(i => !i.isSearched),
657-
timings: permanent.timings,
656+
items: prsOfTheLaunchpad.items.filter(i => !i.isSearched),
657+
timings: prsOfTheLaunchpad.timings,
658658
};
659659
}
660660

661661
const result = [];
662-
const ids1 = new Set();
663-
if (permanent.items) {
664-
for (const item of permanent.items) {
662+
const idsOfLaunchpadPrs = new Set();
663+
if (prsOfTheLaunchpad.items) {
664+
for (const item of prsOfTheLaunchpad.items) {
665665
if (!item.isSearched) {
666-
ids1.add(item.id);
666+
idsOfLaunchpadPrs.add(item.id);
667667
result.push(item);
668668
}
669669
}
670670
}
671-
for (const item of found.items) {
672-
if (!ids1.has(item.id)) {
671+
for (const item of prsOfSearch.items) {
672+
if (!idsOfLaunchpadPrs.has(item.id)) {
673673
item.isSearched = true;
674674
result.push(item);
675675
}
676676
}
677677

678678
return {
679679
items: result,
680-
timings: found.timings,
680+
timings: prsOfSearch.timings,
681681
};
682682
}
683683

0 commit comments

Comments
 (0)