From 26e54cf72f7ff1c85f3ef995764156330891962b Mon Sep 17 00:00:00 2001 From: Ivan Grachev Date: Thu, 25 Aug 2022 18:59:37 +0300 Subject: [PATCH] Mark currently selected network on iOS --- .../Screens/Accounts/AccountsListViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tokenary iOS/Screens/Accounts/AccountsListViewController.swift b/Tokenary iOS/Screens/Accounts/AccountsListViewController.swift index df20fd38..379f3f73 100644 --- a/Tokenary iOS/Screens/Accounts/AccountsListViewController.swift +++ b/Tokenary iOS/Screens/Accounts/AccountsListViewController.swift @@ -264,7 +264,8 @@ class AccountsListViewController: UIViewController, DataStateContainer { let actionSheet = UIAlertController(title: Strings.selectNetwork, message: nil, preferredStyle: .actionSheet) actionSheet.popoverPresentationController?.sourceView = networkButton for network in EthereumChain.allMainnets { - let action = UIAlertAction(title: network.name, style: .default) { [weak self] _ in + let prefix = network == self.network ? "✅ " : "" + let action = UIAlertAction(title: prefix + network.name, style: .default) { [weak self] _ in self?.selectNetwork(network) } actionSheet.addAction(action) @@ -282,7 +283,8 @@ class AccountsListViewController: UIViewController, DataStateContainer { let actionSheet = UIAlertController(title: Strings.selectTestnet, message: nil, preferredStyle: .actionSheet) actionSheet.popoverPresentationController?.sourceView = networkButton for network in EthereumChain.allTestnets { - let action = UIAlertAction(title: network.name, style: .default) { [weak self] _ in + let prefix = network == self.network ? "✅ " : "" + let action = UIAlertAction(title: prefix + network.name, style: .default) { [weak self] _ in self?.selectNetwork(network) } actionSheet.addAction(action)