feat: sort files by name (#1001)

This commit is contained in:
Aman Harwara
2022-04-28 00:49:27 +05:30
committed by GitHub
parent 96be0d578d
commit 99d83af3ba
11 changed files with 52 additions and 108 deletions

View File

@@ -113,10 +113,7 @@ export class DesktopManager
this.webApplication.notifyWebEvent(WebAppEvent.DesktopWindowLostFocus)
}
async onComponentInstallationComplete(
componentData: DecryptedTransferPayload<ComponentContent>,
error: unknown,
) {
async onComponentInstallationComplete(componentData: DecryptedTransferPayload<ComponentContent>, error: unknown) {
const component = this.application.items.findItem(componentData.uuid)
if (!component) {
return

View File

@@ -129,14 +129,10 @@ export class IOService {
// For a modifier like ctrlKey, must check both event.ctrlKey and event.key.
// That's because on keyup, event.ctrlKey would be false, but event.key == Control would be true.
const matches =
((event.ctrlKey || event.key === KeyboardModifier.Ctrl) &&
modifier === KeyboardModifier.Ctrl) ||
((event.metaKey || event.key === KeyboardModifier.Meta) &&
modifier === KeyboardModifier.Meta) ||
((event.altKey || event.key === KeyboardModifier.Alt) &&
modifier === KeyboardModifier.Alt) ||
((event.shiftKey || event.key === KeyboardModifier.Shift) &&
modifier === KeyboardModifier.Shift)
((event.ctrlKey || event.key === KeyboardModifier.Ctrl) && modifier === KeyboardModifier.Ctrl) ||
((event.metaKey || event.key === KeyboardModifier.Meta) && modifier === KeyboardModifier.Meta) ||
((event.altKey || event.key === KeyboardModifier.Alt) && modifier === KeyboardModifier.Alt) ||
((event.shiftKey || event.key === KeyboardModifier.Shift) && modifier === KeyboardModifier.Shift)
return matches
})
@@ -190,10 +186,7 @@ export class IOService {
continue
}
if (
observer.key &&
this.eventMatchesKeyAndModifiers(event, observer.key, observer.modifiers)
) {
if (observer.key && this.eventMatchesKeyAndModifiers(event, observer.key, observer.modifiers)) {
const callback = keyEvent === KeyboardKeyEvent.Down ? observer.onKeyDown : observer.onKeyUp
if (callback) {
callback(event)