Thor icon indicating copy to clipboard operation
Thor copied to clipboard

can not add new item

Open hgyxbll opened this issue 9 months ago • 2 comments

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.

hgyxbll avatar May 14 '24 12:05 hgyxbll