mirnovov/obsidian-homepage

Command doesn't run when using Workspace as home

Closed this issue · 1 comments

Details

My command doesn't run when I use a Workspace as homepage. Whereas it does work when I use a File as homepage.

Background information
My objective is to always start from a "untouched" state, e.g. default layout, only one file open and all folders collapsed. I am trying to achieve this using this plugin (in combination with "Collapse All").

Steps to reproduce

  1. Set Homepage to Workspace: Default
  2. Add command, in my case Collapse All: Collapse open folders in all file explorers.
  3. Open some folders.
  4. Restart Obsidian.

Result
Layout is applied. But folders are still open.

Both running the command manually using the command palette works, as well as Setting Homepage to File: Home work fine, so I figure it's not because of the plugin itself, but I might be wrong.

Current workaround
Setting Homepage to File: Home.

Debug information

{
    "version": 3,
    "homepages": {
        "Main Homepage": {
            "value": "Default",
            "kind": "Workspace",
            "openOnStartup": true,
            "openMode": "Keep open notes",
            "manualOpenMode": "Keep open notes",
            "view": "Default view",
            "revertView": true,
            "openWhenEmpty": true,
            "refreshDataview": false,
            "autoCreate": false,
            "autoScroll": false,
            "pin": false,
            "commands": [
                "obsidian-collapse-all-plugin:collapse-file-explorer"
            ],
            "alwaysApply": false,
            "hideReleaseNotes": false
        }
    },
    "separateMobile": false,
    "_defaultViewMode": "default",
    "_livePreview": "default",
    "_focusNewTab": "default",
    "_plugins": [
        "obsidian-icon-folder",
        "js-snippets",
        "settings-search",
        "omnisearch",
        "recent-files-obsidian",
        "obsidian-opener",
        "homepage",
        "obsidian-collapse-all-plugin"
    ],
    "_internalPlugins": [
        "file-explorer",
        "global-search",
        "switcher",
        "graph",
        "backlink",
        "canvas",
        "outgoing-link",
        "tag-pane",
        "properties",
        "page-preview",
        "daily-notes",
        "templates",
        "command-palette",
        "editor-status",
        "bookmarks",
        "outline",
        "word-count",
        "workspaces",
        "file-recovery"
    ],
    "_obsidianVersion": "1.5.8"
}

Checklist

  • I updated to the latest version of the plugin.

Duplicate of #80. The fix for this will be released in a future version.