feat(popover): sort keymaps and macros alphabetically (#534)
* feat(popover): sort keymaps and macros alphabetically Closes #512 * small performance refactoring
This commit is contained in:
committed by
László Monda
parent
a44a7dc5f8
commit
02f1053d46
9
packages/uhk-web/src/app/util/find-new-item.ts
Normal file
9
packages/uhk-web/src/app/util/find-new-item.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export function findNewItem<T>(oldItems: T[], newItems: T[]): T {
|
||||
for (let i = 0; i < oldItems.length; ++i) {
|
||||
if (oldItems[i] !== newItems[i]) {
|
||||
return newItems[i];
|
||||
}
|
||||
}
|
||||
|
||||
return newItems[newItems.length - 1];
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './find-new-item';
|
||||
export * from './html-helper';
|
||||
export * from './validators';
|
||||
export * from './version-helper';
|
||||
|
||||
Reference in New Issue
Block a user