Skip to content

Commit

Permalink
load all channels and ensure lora config provided
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcottle committed Nov 28, 2024
1 parent 402f126 commit b41af44
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/pages/settings/NodeChannelsSettingsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>

<!-- loaded -->
<div v-else-if="channels != null" class="flex h-full w-full overflow-hidden">
<div v-else-if="loraConfig != null && channels != null" class="flex h-full w-full overflow-hidden">

<div class="w-full overflow-y-auto">
<div v-for="channel of channels" class="flex cursor-pointer p-2 bg-white hover:bg-gray-50">
Expand Down Expand Up @@ -127,7 +127,7 @@ export default {
this.errorTitle = null;
this.errorSubtitle = null;
this.loraConfig = null;
this.channels = [];
this.channels = null;
this.channelsLoaded = 0;
// get channels from node
Expand All @@ -146,12 +146,6 @@ export default {
this.loadingStatus = `Fetching Channel ${channelIndex + 1} / ${channelsToLoad}`;
const channel = await NodeAPI.remoteAdminGetChannel(this.nodeId, channelIndex + 1);
// if we find a disabled channel, don't add it to the list. we can also stop loading more channels
// as the device always returns disabled channels after active channels
if(channel.role === Protobuf.Channel.Channel_Role.DISABLED){
break;
}
// add to channels list
channels.push(channel);
this.channelsLoaded = channels.length;
Expand Down

0 comments on commit b41af44

Please sign in to comment.