Improve data source selection, clean up unused preferences

This commit is contained in:
Djuri 2024-12-28 18:19:31 +01:00
parent bc3e5afe51
commit 64e518bf58
13 changed files with 155 additions and 104 deletions

View file

@ -13,7 +13,7 @@ namespace V2Notify
void setupV2Notify()
{
String hostname = "ws.btclock.dev";
if (preferences.getBool("ceEnabled", DEFAULT_CUSTOM_ENDPOINT_ENABLED))
if (getDataSource() == CUSTOM_SOURCE)
{
Serial.println(F("Connecting to custom source"));
hostname = preferences.getString("ceEndpoint", DEFAULT_CUSTOM_ENDPOINT);