Skip to content

Commit

Permalink
Fix bug in workspace rename
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingislost committed Jun 27, 2022
1 parent 7a44af6 commit d7168b4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ Share feedback, issues, and ideas on [github](https://github.com/nothingislost/o

## Changelog

- 0.3.1
- Fix bug in workspace rename logic which was preventing hotkey reassignment

- 0.3.0
- Add hotkey support for loading specific workspaces
- This feature will create a command for every workspace in your vault, which can then be bound to hotkeys
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "workspaces-plus",
"name": "Workspaces Plus",
"version": "0.3.0",
"version": "0.3.1",
"minAppVersion": "0.9.12",
"description": "Quickly switch and manage workspaces",
"author": "NothingIsLost",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-workspaces-plus",
"version": "0.3.0",
"version": "0.3.1",
"description": "Quickly switch and manage workspaces",
"main": "main.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export default class WorkspacesPlus extends Plugin {
onWorkspaceRename(name: string, oldName: string) {
this.setWorkspaceName();
// remove the old command
(this.app as any).commands.removeCommand(oldName);
const hotkeys = (this.app as any).hotkeyManager.getHotkeys(oldName);
(this.app as any).commands.removeCommand(`${this.manifest.id}:${oldName}`);
const hotkeys = (this.app as any).hotkeyManager.getHotkeys(`${this.manifest.id}:${oldName}`);
// register the new command
this.registerWorkspaceHotkeys();
if (hotkeys) {
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"0.3.1": "0.9.12",
"0.3.0": "0.9.12",
"0.2.0": "0.9.12",
"0.1.4": "0.9.12",
Expand Down

0 comments on commit d7168b4

Please sign in to comment.