Skip to content

Commit c2d69ac

Browse files
committed
Merge branch 'hotfix/0.3.12' into develop
2 parents 5e9b7ae + 6548741 commit c2d69ac

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

Adamant/AppDelegate.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ struct AdamantResources {
3838
static let nodes: [Node] = [
3939
Node(scheme: .https, host: "endless.adamant.im", port: nil),
4040
Node(scheme: .https, host: "clown.adamant.im", port: nil),
41-
Node(scheme: .https, host: "lake.adamant.im", port: nil),
42-
Node(scheme: .https, host: "158.69.59.45", port: nil),
43-
Node(scheme: .https, host: "54.36.183.233", port: nil)
41+
Node(scheme: .https, host: "lake.adamant.im", port: nil)
4442
]
4543

4644
static let iosAppSupportEmail = "ios@adamant.im"

Adamant/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>0.3.12</string>
2121
<key>CFBundleVersion</key>
22-
<string>30</string>
22+
<string>31</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>NSCameraUsageDescription</key>

Adamant/Stories/NodesEditor/NodeEditorViewController.swift

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,29 @@ class NodeEditorViewController: FormViewController {
231231
// MARK: - Actions
232232
extension NodeEditorViewController {
233233
func testNode(completion: ((Bool) -> Void)? = nil) {
234-
guard let url = node?.asURL() else {
234+
var components = URLComponents()
235+
236+
// Host
237+
if let row: TextRow = form.rowBy(tag: Rows.host.tag), let host = row.value {
238+
components.host = host
239+
}
240+
241+
// Scheme
242+
if let row = form.rowBy(tag: Rows.scheme.tag), let scheme = row.baseValue as? URLScheme {
243+
components.scheme = scheme.rawValue
244+
} else {
245+
components.scheme = "https"
246+
}
247+
248+
// Port
249+
if let row: IntRow = form.rowBy(tag: Rows.port.tag), let port = row.value {
250+
components.port = port
251+
}
252+
253+
let url: URL
254+
do {
255+
url = try components.asURL()
256+
} catch {
235257
testState = .failed
236258
dialogService.showWarning(withMessage: String.adamantLocalized.nodesEditor.failedToBuildURL)
237259
return

0 commit comments

Comments
 (0)