Skip to content

Commit

Permalink
fix mobile setting preventing load on new installs
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpetro committed Sep 17, 2024
1 parent 6a53fab commit a16d03d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions build/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ fs.copyFileSync(manifest_path, path.join(process.cwd(), 'dist', 'manifest.json')
fs.copyFileSync(styles_path, path.join(process.cwd(), 'dist', 'styles.css'));

const destination_vaults = [
'sc-test-vault',
'obsidian-1',
// 'sc-test-vault',
// 'obsidian-1',
'Obsidian-C',
];

// get first argument as entry point
Expand Down
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class SmartConnectionsPlugin extends Plugin {
get env_data_dir() { return this.settings.env_data_dir || this.settings.smart_connections_folder; }
get smart_env_class() { return SmartEnv; }
get smart_env_config() {
return {
const config = {
...smart_env_config,
env_path: '', // scope handled by Obsidian FS methods
env_data_dir: this.env_data_dir, // used to scope SmartEnvSettings.fs
Expand All @@ -58,9 +58,10 @@ export default class SmartConnectionsPlugin extends Plugin {
templates: templates,
request_adapter: this.obsidian.requestUrl, // NEEDS BETTER HANDLING
chat_classes: this.chat_classes,
// mobile enable/disable
prevent_load_on_init: !this.settings.enable_mobile,
};
// mobile enable/disable
if(this.obsidian.Platform.isMobile && !this.settings.enable_mobile) config.prevent_load_on_init = true;
return config;
}
get chat_classes() { return { ScActions, ScChatsUI, ScChats, ScChatModel }; }
get_tfile(file_path) { return this.app.vault.getAbstractFileByPath(file_path); }
Expand Down

0 comments on commit a16d03d

Please sign in to comment.