diff --git a/src/components/pages/settings/NodeChannelsSettingsPage.vue b/src/components/pages/settings/NodeChannelsSettingsPage.vue
index b06f548..d3079dc 100644
--- a/src/components/pages/settings/NodeChannelsSettingsPage.vue
+++ b/src/components/pages/settings/NodeChannelsSettingsPage.vue
@@ -6,6 +6,13 @@
+
+
+
+
+
@@ -115,7 +122,19 @@ export default {
};
},
mounted() {
+
+ // use cached channels and lora config if available
+ const channels = GlobalState.remoteNodeChannels[this.nodeId];
+ const loraConfig = GlobalState.remoteNodeLoraConfig[this.nodeId];
+ if(channels && loraConfig){
+ this.channels = channels;
+ this.loraConfig = loraConfig;
+ return;
+ }
+
+ // nothing is cached, request from device
this.getChannels();
+
},
methods: {
getNodeLongName: (nodeId) => NodeUtils.getNodeLongName(nodeId),
@@ -184,6 +203,7 @@ export default {
// update global state
// fixme: this is used to access cached channels from channel settings page
GlobalState.remoteNodeChannels[this.nodeId] = channels;
+ GlobalState.remoteNodeLoraConfig[this.nodeId] = loraConfig;
} catch(e) {
diff --git a/src/js/GlobalState.js b/src/js/GlobalState.js
index 7122251..f583171 100644
--- a/src/js/GlobalState.js
+++ b/src/js/GlobalState.js
@@ -19,6 +19,7 @@ const globalState = reactive({
// cache channels fetched from remote nodes
remoteNodeChannels: {},
+ remoteNodeLoraConfig: {},
});