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

Fix files shown as IDLE when opened with CustomEditor, add support for *.drawio files #61

Merged
merged 4 commits into from
Apr 25, 2022
Merged

Conversation

cathaypacific8747
Copy link
Contributor

When opening *.drawio files, this extension incorrectly shows the discord status as "Idling":

idle

This also occurs when you preview or edit any file in a non-text-based editor, affecting wide range of files (such as PNG, JPG etc.)

After debugging, it appears to me that window.activeTextEditor will always cast to undefined when being opened in such an editor, causing many parts of the code to be unable to retrieve the file name, file location and other information. This PR fixes this issue by obtaining the selected file's URI indirectly, then parsing the required information. I've also added the *.drawio icons in this PR.

fixed

Hopefully this will be helpful :)

@leonardssh
Copy link
Owner

Thanks for this PR, everything seems to be working properly. Just a small idling problem, but I fixed it in the last commit. 👍

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

Successfully merging this pull request may close these issues.

3 participants