Skip to content

Commit

Permalink
tweak proxy icons
Browse files Browse the repository at this point in the history
this changes the proxy icon above the chatlist
to checked-shield (ON) and emtpy-shield (OFF)

- the striked-shield for OFF is confusing,
  as at other places, the strike through is used to show an action,
  so what would happen when the button is pressed (mute).
  analoguely, the strike-shield, one could think, the button removes the proxy.

- the checked-shield is better in that regard: while still showing state,
  it is still true that the action is to check another proxy

- empty-shield as a button also works better,
  action is to show the proxy list

state vs. action on buttons is tricky :)

moreover, the change is analogue to Telegram-iOS,
and also to deltachat-android, at least for the empty-shield :)
  • Loading branch information
r10s committed Nov 14, 2024
1 parent 3232a19 commit 687669b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deltachat-ios/Controller/ChatListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ChatListViewController: UITableViewController {
let button: UIBarButtonItem

if #available(iOS 13, *) {
button = UIBarButtonItem(image: UIImage(systemName: "shield"), style: .plain, target: self, action: #selector(ChatListViewController.showProxySettings))
button = UIBarButtonItem(image: UIImage(systemName: "checkmark.shield"), style: .plain, target: self, action: #selector(ChatListViewController.showProxySettings))
} else {
button = UIBarButtonItem(title: String.localized("proxy_settings"), style: .plain, target: self, action: #selector(ChatListViewController.showProxySettings))
}
Expand Down Expand Up @@ -729,9 +729,9 @@ class ChatListViewController: UITableViewController {
guard #available(iOS 13, *) else { return }

if dcContext.isProxyEnabled {
proxyShieldButton.image = UIImage(systemName: "shield")
proxyShieldButton.image = UIImage(systemName: "checkmark.shield")
} else {
proxyShieldButton.image = UIImage(systemName: "shield.slash")
proxyShieldButton.image = UIImage(systemName: "shield")
}
}

Expand Down

0 comments on commit 687669b

Please sign in to comment.