First version with app notifications
This commit is contained in:
@@ -25,14 +25,10 @@ class TVCFilter: UITableViewController, EditActionsRemove {
|
||||
}
|
||||
|
||||
@IBAction private func addNewFilter() {
|
||||
let desc: String
|
||||
switch currentFilter {
|
||||
case .blocked: desc = "Enter the domain name you wish to block."
|
||||
case .ignored: desc = "Enter the domain name you wish to ignore."
|
||||
default: return
|
||||
}
|
||||
let alert = AskAlert(title: "Create new filter", text: desc, buttonText: "Add") {
|
||||
guard let dom = $0.textFields?.first?.text else {
|
||||
let alert = AskAlert(title: "Create new filter",
|
||||
text: "Enter the domain name you wish to add.",
|
||||
buttonText: "Add") {
|
||||
guard let dom = $0.textFields?.first?.text?.lowercased() else {
|
||||
return
|
||||
}
|
||||
guard dom.contains("."), !dom.isKnownSLD() else {
|
||||
|
||||
Reference in New Issue
Block a user