From 897338b9dcf88b1eddf5f36c3f19e37f244c34b4 Mon Sep 17 00:00:00 2001 From: jimiatnymbl Date: Sun, 26 Dec 2021 13:41:32 -0700 Subject: [PATCH] Fix formatting --- source/Main.brs | 8 ++++---- source/ShowScenes.brs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/Main.brs b/source/Main.brs index 194d9263..be7b3c0d 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -415,9 +415,9 @@ sub SaveServerList() entryCount = 0 addNewEntry = true savedServers = { serverList: [] } - if saved <> invalid + if saved <> invalid savedServers = ParseJson(saved) - entryCount = savedServers.serverList.Count() + entryCount = savedServers.serverList.Count() if savedServers.serverList <> invalid and entryCount > 0 for each item in savedServers.serverList if item.baseUrl = LCase(server) 'Saved server data is always lowercase @@ -427,9 +427,9 @@ sub SaveServerList() end for end if end if - + if addNewEntry - if entryCount = 0 + if entryCount = 0 set_setting("saved_servers", FormatJson({ serverList: [{ name: m.serverSelection, baseUrl: LCase(server), iconUrl: "pkg:/images/logo-icon120.jpg", iconWidth: 120, iconHeight: 120 }] })) else savedServers.serverList.Push({ name: m.serverSelection, baseUrl: LCase(server), iconUrl: "pkg:/images/logo-icon120.jpg", iconWidth: 120, iconHeight: 120 }) diff --git a/source/ShowScenes.brs b/source/ShowScenes.brs index b0732b40..25617cfd 100644 --- a/source/ShowScenes.brs +++ b/source/ShowScenes.brs @@ -370,7 +370,7 @@ sub UpdateSavedServerList() end if saved = get_setting("saved_servers") - if saved <> invalid + if saved <> invalid savedServers = ParseJson(saved) if savedServers.serverList <> invalid and savedServers.serverList.Count() > 0 newServers = { serverList: [] }