Use primary color for normal actions

This commit is contained in:
Davide De Rosa 2019-11-21 15:08:05 +01:00
parent 9c916b335e
commit 05697b12cc
2 changed files with 8 additions and 1 deletions

View File

@ -170,6 +170,12 @@ extension UIBarButtonItem {
} }
} }
extension UIContextualAction {
func applyNormal(_ theme: Theme) {
backgroundColor = theme.palette.primaryBackground
}
}
// XXX: status bar is broken // XXX: status bar is broken
extension MFMailComposeViewController { extension MFMailComposeViewController {
func apply(_ theme: Theme) { func apply(_ theme: Theme) {

View File

@ -247,12 +247,13 @@ extension ProviderPoolViewController: UITableViewDataSource, UITableViewDelegate
self.favoriteGroup(withId: groupId) self.favoriteGroup(withId: groupId)
$2(true) $2(true)
} }
action.applyNormal(.current)
} else { } else {
return nil return nil
} }
let cfg = UISwipeActionsConfiguration(actions: [action]) let cfg = UISwipeActionsConfiguration(actions: [action])
cfg.performsFirstActionWithFullSwipe = true cfg.performsFirstActionWithFullSwipe = false
return cfg return cfg
} }