+4
-2
src-tauri/src/lib.rs
+4
-2
src-tauri/src/lib.rs
···
1
1
use std::{ fs, sync::Mutex };
2
+
2
3
use crossbeam_channel::bounded;
3
-
use tokio::sync;
4
-
5
4
use frontend_calls::*;
6
5
7
6
use crate::{ osc::OSCMessage, setup::setup, utils::config::Config };
···
16
15
#[cfg_attr(mobile, tauri::mobile_entry_point)]
17
16
#[tokio::main]
18
17
pub async fn run() {
18
+
// TODO: Impl background running by default
19
+
// TODO: Auto loading last loaded tabs
20
+
19
21
let container_folder = dirs::config_dir().unwrap().join("VRCMacros");
20
22
21
23
match fs::metadata(&container_folder) {
+3
-3
src/Mangers/NodeManager.tsx
+3
-3
src/Mangers/NodeManager.tsx
···
195
195
}
196
196
197
197
198
-
public UpdateConfig(){
198
+
public UpdateConfig( needsSave = true ){
199
199
if(!this._selectedTab)return;
200
200
let tab = this._tabs[this._selectedTab];
201
201
if(!tab)return;
···
203
203
if(tab.refuseSync)return;
204
204
invoke('sync_tab', { graph: this._generateTabGraph(tab.id)[0], id: tab.id });
205
205
206
-
tab.setNeedsSave(true);
206
+
if(needsSave)tab.setNeedsSave(true);
207
207
}
208
208
209
209
private async _loadFromConfig( path: string, config: string ){
···
273
273
tab.nodes = this._nodes;
274
274
275
275
tab.refuseSync = false;
276
-
this.UpdateConfig();
276
+
this.UpdateConfig(false);
277
277
}
278
278
279
279
private _generateTabGraph( tabId: string | null ): [ any, Tab | null ]{