This repository has been archived by the owner. It is now read-only.
Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
9,941 additions
and 51 deletions.
- +4 −0 Client.xcodeproj/project.pbxproj
- +132 −24 Cliqz/Intro/CliqzIntroViewController.swift
- +64 −0 Cliqz/Privacy/AdAndTrackingProtection/BlockListManager/Operations/ChangeTrackersOperation.swift
- +13 −13 Cliqz/Privacy/AdAndTrackingProtection/TrackingManagement/TrackerList.swift
- +1 −1 Cliqz/Privacy/AdAndTrackingProtection/UserPreferences.swift
- +54 −6 Cliqz/Privacy/UI/ControlCenter/OverviewViewController.swift
- BIN Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-Adblock.imageset/Ad & Tracker Blocking.png
- BIN Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-Adblock.imageset/Ad & Tracker Blocking@2x.png
- +2 −0 Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-Adblock.imageset/Contents.json
- +2 −0 Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-CliqzTab.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-CliqzTab.imageset/Start Tab.png
- BIN Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-CliqzTab.imageset/Start Tab@2x.png
- +2 −0 Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-Introduction.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-Introduction.imageset/Introducing.png
- BIN Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-Introduction.imageset/Introducing@2x.png
- +2 −0 Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-QuickSearch.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-QuickSearch.imageset/Quick Search.png
- BIN Cliqz/Resources/Cliqz.xcassets/Intro/ghostery-QuickSearch.imageset/Quick Search@2x.png
- +6 −7 Cliqz/Storage/PrivacyStore/TrackerStateStore.swift
- +9,659 −0 yarn.lock
| @@ -0,0 +1,64 @@ | ||
| // | ||
| // ChangeTrackersOperation.swift | ||
| // Client | ||
| // | ||
| // Created by Tim Palade on 9/3/18. | ||
| // Copyright © 2018 Cliqz. All rights reserved. | ||
| // | ||
| import Storage | ||
|
|
||
| public class ChangeTrackersOperation: Operation { | ||
|
|
||
| public enum BlockOption { | ||
| case blockAll | ||
| case unblockAll | ||
| } | ||
|
|
||
| var blockOption: BlockOption = .blockAll | ||
|
|
||
| private var _executing: Bool = false | ||
| override public var isExecuting: Bool { | ||
| get { | ||
| return _executing | ||
| } | ||
| set { | ||
| if _executing != newValue { | ||
| willChangeValue(forKey: "isExecuting") | ||
| _executing = newValue | ||
| didChangeValue(forKey: "isExecuting") | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private var _finished: Bool = false; | ||
| override public var isFinished: Bool { | ||
| get { | ||
| return _finished | ||
| } | ||
| set { | ||
| if _finished != newValue { | ||
| willChangeValue(forKey: "isFinished") | ||
| _finished = newValue | ||
| didChangeValue(forKey: "isFinished") | ||
| } | ||
| } | ||
| } | ||
|
|
||
| public init(blockOption: BlockOption) { | ||
| super.init() | ||
| self.blockOption = blockOption | ||
| } | ||
|
|
||
| override public func main() { | ||
| self.isExecuting = true | ||
| if blockOption == .blockAll { | ||
| TrackerStateStore.change(appIds: TrackerList.instance.appsList.map{app in return app.appId}, toState: .blocked) | ||
| } | ||
| else if blockOption == .unblockAll { | ||
| TrackerStateStore.change(appIds: TrackerList.instance.appsList.map{app in return app.appId}, toState: .empty) | ||
| } | ||
| self.isFinished = true | ||
| } | ||
| } | ||
|
|
Oops, something went wrong.