First version with app notifications

This commit is contained in:
relikd
2020-07-26 22:32:11 +02:00
parent 88a52fb92c
commit a2b0f311d5
37 changed files with 2192 additions and 469 deletions

View File

@@ -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 {