@@ -923,7 +923,7 @@ class BrowserViewController: UIViewController {
923
923
webView. evaluateJavaScript ( " __firefox__.metadata.extractMetadata() " , completionHandler: nil )
924
924
925
925
if #available( iOS 11 , * ) {
926
- if ( NoImageModeHelper . isActivated ( profile. prefs) ) {
926
+ if NoImageModeHelper . isActivated ( profile. prefs) {
927
927
webView. evaluateJavaScript ( " __firefox__.NoImageMode.setEnabled(true) " , completionHandler: nil )
928
928
}
929
929
}
@@ -1308,7 +1308,7 @@ extension BrowserViewController: URLBarDelegate {
1308
1308
}
1309
1309
1310
1310
let successCallback : ( String ) -> Void = { ( successMessage) in
1311
- SimpleToast ( ) . showAlertWithText ( successMessage, bottomContainer: self . webViewContainer)
1311
+ SimpleToast ( ) . showAlertWithText ( successMessage, bottomContainer: self . webViewContainer)
1312
1312
}
1313
1313
1314
1314
guard let tab = tabManager. selectedTab, tab. url != nil else { return }
@@ -1459,7 +1459,7 @@ extension BrowserViewController: URLBarDelegate {
1459
1459
1460
1460
profile. bookmarks. getURLForKeywordSearch ( possibleKeyword) . uponQueue ( DispatchQueue . main) { result in
1461
1461
if var urlString = result. successValue,
1462
- let escapedQuery = possibleQuery. addingPercentEncoding ( withAllowedCharacters: NSCharacterSet . urlQueryAllowed) ,
1462
+ let escapedQuery = possibleQuery. addingPercentEncoding ( withAllowedCharacters: NSCharacterSet . urlQueryAllowed) ,
1463
1463
let range = urlString. range ( of: " %s " ) {
1464
1464
urlString. replaceSubrange ( range, with: escapedQuery)
1465
1465
@@ -1533,7 +1533,7 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
1533
1533
1534
1534
let controller = UIAlertController ( title: nil , message: nil , preferredStyle: . actionSheet)
1535
1535
controller. addAction ( UIAlertAction ( title: toggleActionTitle, style: . default, handler: { _ in tab. toggleDesktopSite ( ) } ) )
1536
- controller. addAction ( UIAlertAction ( title: NSLocalizedString ( " Cancel " , comment: " Label for Cancel button " ) , style: . cancel, handler: nil ) )
1536
+ controller. addAction ( UIAlertAction ( title: NSLocalizedString ( " Cancel " , comment: " Label for Cancel button " ) , style: . cancel, handler: nil ) )
1537
1537
controller. popoverPresentationController? . sourceView = toolbar ?? urlBar
1538
1538
controller. popoverPresentationController? . sourceRect = button. frame
1539
1539
present ( controller, animated: true , completion: nil )
@@ -1553,7 +1553,7 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
1553
1553
1554
1554
func tabToolbarDidPressMenu( _ tabToolbar: TabToolbarProtocol , button: UIButton ) {
1555
1555
// ensure that any keyboards or spinners are dismissed before presenting the menu
1556
- UIApplication . shared. sendAction ( #selector( UIResponder . resignFirstResponder) , to: nil , from: nil , for: nil )
1556
+ UIApplication . shared. sendAction ( #selector( UIResponder . resignFirstResponder) , to: nil , from: nil , for: nil )
1557
1557
var actions : [ [ PhotonActionSheetItem ] ] = [ ]
1558
1558
1559
1559
actions. append ( getHomePanelActions ( ) )
@@ -2208,7 +2208,7 @@ extension BrowserViewController: UIAdaptivePresentationControllerDelegate {
2208
2208
extension BrowserViewController : ReaderModeStyleViewControllerDelegate {
2209
2209
func readerModeStyleViewController( _ readerModeStyleViewController: ReaderModeStyleViewController , didConfigureStyle style: ReaderModeStyle ) {
2210
2210
// Persist the new style to the profile
2211
- let encodedStyle : [ String : Any ] = style. encodeAsDictionary ( )
2211
+ let encodedStyle : [ String : Any ] = style. encodeAsDictionary ( )
2212
2212
profile. prefs. setObject ( encodedStyle, forKey: ReaderModeProfileKeyStyle)
2213
2213
// Change the reader mode style on all tabs that have reader mode active
2214
2214
for tabIndex in 0 ..< tabManager. count {
@@ -2332,7 +2332,7 @@ extension BrowserViewController {
2332
2332
2333
2333
var readerModeStyle = DefaultReaderModeStyle
2334
2334
if let dict = profile. prefs. dictionaryForKey ( ReaderModeProfileKeyStyle) {
2335
- if let style = ReaderModeStyle ( dict: dict as [ String : AnyObject ] ) {
2335
+ if let style = ReaderModeStyle ( dict: dict as [ String : AnyObject ] ) {
2336
2336
readerModeStyle = style
2337
2337
}
2338
2338
}
@@ -2348,7 +2348,7 @@ extension BrowserViewController: ReaderModeBarViewDelegate {
2348
2348
if let readerMode = tabManager. selectedTab? . getHelper ( name: " ReaderMode " ) as? ReaderMode , readerMode. state == ReaderModeState . active {
2349
2349
var readerModeStyle = DefaultReaderModeStyle
2350
2350
if let dict = profile. prefs. dictionaryForKey ( ReaderModeProfileKeyStyle) {
2351
- if let style = ReaderModeStyle ( dict: dict as [ String : AnyObject ] ) {
2351
+ if let style = ReaderModeStyle ( dict: dict as [ String : AnyObject ] ) {
2352
2352
readerModeStyle = style
2353
2353
}
2354
2354
}
@@ -2773,7 +2773,7 @@ extension BrowserViewController {
2773
2773
2774
2774
self . profile. searchEngines. addSearchEngine ( OpenSearchEngine ( engineID: nil , shortName: shortName, image: image, searchTemplate: searchQuery, suggestTemplate: nil , isCustomEngine: true ) )
2775
2775
let Toast = SimpleToast ( )
2776
- Toast . showAlertWithText ( Strings . ThirdPartySearchEngineAdded, bottomContainer: self . webViewContainer)
2776
+ Toast . showAlertWithText ( Strings . ThirdPartySearchEngineAdded, bottomContainer: self . webViewContainer)
2777
2777
}
2778
2778
}
2779
2779
0 commit comments