From d41a524ca350f41207ddba4982749f0cff6a5ad1 Mon Sep 17 00:00:00 2001 From: Aydar Date: Sun, 1 Aug 2021 14:26:52 +0300 Subject: [PATCH] Fixed a very dumb thing I feel so stupid rn --- ViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ViewController.swift b/ViewController.swift index c2cbdcd..83c1bbb 100644 --- a/ViewController.swift +++ b/ViewController.swift @@ -1034,10 +1034,12 @@ class ViewController: NSViewController{ var custom: CustomFrequencies? = nil if let a = ViewController.configFilePath { custom = try? JSONDecoder().decode(CustomFrequencies.self, from: FileHandle(forReadingFrom: a).readDataToEndOfFile()).reliable() - if log, let c = custom, let cf = c.frequencies, cf.count > 0 { - tprint("From memory: \(cf.count)") + if let c = custom, let cf = c.frequencies, cf.count > 0 { + if log { tprint("From memory: \(cf.count)") } ViewController.retrievedFrequencies.append(contentsOf: cf) } + } else { + tprint("WARN6: Memory error") } SFX.playSFX(sfx: SFX.Effects.radioSetup) tprint(log ? "Connecting via \((ViewController.defaults.integer(forKey: "server") == 1) ? "Silverwing" : "Sprint")" : "Please wait...")