From 3288b85071224dc5938ccce27477603bfadb20d2 Mon Sep 17 00:00:00 2001
From: tobtoht <thotbot@protonmail.com>
Date: Sat, 14 Aug 2021 17:14:27 +0200
Subject: [PATCH] Nodes: don't append http:// on add custom node

---
 src/widgets/NodeWidget.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/widgets/NodeWidget.cpp b/src/widgets/NodeWidget.cpp
index 23d6afa..3b94d89 100644
--- a/src/widgets/NodeWidget.cpp
+++ b/src/widgets/NodeWidget.cpp
@@ -135,8 +135,9 @@ void NodeWidget::onCustomAddClicked(){
     auto currentNodes = m_ctx->nodes->customNodes();
     QString currentNodesText;
 
-    for (auto &entry: currentNodes)
-        currentNodesText += QString("%1\n").arg(entry.url.toString());
+    for (auto &entry: currentNodes) {
+        currentNodesText += QString("%1\n").arg(entry.toFullAddress());
+    }
 
     bool ok;
     QString text = QInputDialog::getMultiLineText(this, "Add custom node(s).", "E.g: user:password@127.0.0.1:18081", currentNodesText, &ok);
@@ -145,9 +146,9 @@ void NodeWidget::onCustomAddClicked(){
 
     QList<FeatherNode> nodesList;
     auto newNodesList = text.split("\n");
-    for(auto &newNodeText: newNodesList) {
+    for (auto &newNodeText: newNodesList) {
         newNodeText = newNodeText.replace("\r", "").trimmed();
-        if(newNodeText.isEmpty())
+        if (newNodeText.isEmpty())
             continue;
 
         auto node = FeatherNode(newNodeText);