Skip to content

can not add new item #69

@hgyxbll

Description

@hgyxbll

system: macos 13.6
bug: it can not add new app.
reappear step:
when click '+', it popup a window to select app, I select it and click ok. nothing added.

I download the code and debug it, and find that at Thor/ShortcutListViewController.swift:49

        openPanel.beginSheetModal(for: view.window!, completionHandler: { (result) in
            if result == NSApplication.ModalResponse.OK, let metaDataItem = NSMetadataItem(url: openPanel.urls.first!) {
                let app = AppModel(item: metaDataItem)

                AppsManager.manager.save(app, shortcut: nil)

                self.tableView.reloadData()
                self.tableView.scrollRowToVisible(self.apps.count - 1)
            }
        })

metaDataItem is null, so can not add item.
but openPanel.urls.first have value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions