From 3a4b30ca6b12c387de42ef4a98df89fb7c856cc0 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sat, 8 Feb 2020 17:37:30 -0800 Subject: [PATCH] Slight name change. --- .../General/PreferencesViewController.swift | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Clocker/Preferences/General/PreferencesViewController.swift b/Clocker/Preferences/General/PreferencesViewController.swift index d62cc54..27ed152 100644 --- a/Clocker/Preferences/General/PreferencesViewController.swift +++ b/Clocker/Preferences/General/PreferencesViewController.swift @@ -568,28 +568,28 @@ extension PreferencesViewController { NetworkManager.task(with: urlString) { [weak self] response, error in - guard let self = self else { return } + guard let strongSelf = self else { return } OperationQueue.main.addOperation { - if self.handleEdgeCase(for: response) == true { - self.reloadSearchResults() + if strongSelf.handleEdgeCase(for: response) == true { + strongSelf.reloadSearchResults() return } - if error == nil, let json = response, let timezone = self.decodeTimezone(from: json) { - if self.availableTimezoneTableView.selectedRow >= 0 { - self.installTimezone(timezone) + if error == nil, let json = response, let timezone = strongSelf .decodeTimezone(from: json) { + if strongSelf.availableTimezoneTableView.selectedRow >= 0 { + strongSelf.installTimezone(timezone) } - self.updateViewState() + strongSelf.updateViewState() } else { OperationQueue.main.addOperation { if error?.localizedDescription == "The Internet connection appears to be offline." { - self.placeholderLabel.placeholderString = PreferencesConstants.noInternetConnectivityError + strongSelf.placeholderLabel.placeholderString = PreferencesConstants.noInternetConnectivityError } else { - self.placeholderLabel.placeholderString = PreferencesConstants.tryAgainMessage + strongSelf.placeholderLabel.placeholderString = PreferencesConstants.tryAgainMessage } - self.isActivityInProgress = false + strongSelf.isActivityInProgress = false } } }