Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not add new item #69

Open
hgyxbll opened this issue May 14, 2024 · 2 comments
Open

can not add new item #69

hgyxbll opened this issue May 14, 2024 · 2 comments

Comments

@hgyxbll
Copy link

hgyxbll commented May 14, 2024

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.

@gbammc
Copy link
Owner

gbammc commented May 15, 2024

It seams like NSMetadataItem cannot init with the value of openPanel.urls.first, so what is it?

@hgyxbll
Copy link
Author

hgyxbll commented May 15, 2024

It seams like NSMetadataItem cannot init with the value of openPanel.urls.first, so what is it?
截屏2024-05-15 20 06 54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants