Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed getting the default value of Enhanced Ad-Blocking

  • Loading branch information
mahmoud-adam85 authored and naira-cliqz committed Jul 31, 2018
1 parent 2d24e2f commit a02046a1ca8d32a06fceb926dbc9ae13e0f665aa
Showing with 4 additions and 3 deletions.
  1. +4 −3 Cliqz/Privacy/AdAndTrackingProtection/UserPreferences.swift
@@ -79,11 +79,12 @@ import Storage

var adblockingMode: AdblockingMode {
get {
if let mode = AdblockingMode(rawValue: userDefaults().integer(forKey: AdblockingModeKey)) {
return mode
if let mode = userDefaults().object(forKey: AdblockingModeKey) as? Int,
let blockingMode = AdblockingMode(rawValue: mode) {
return blockingMode
}
else {
return .blockNone
return .blockAll
}
}
set {

0 comments on commit a02046a

Please sign in to comment.