         }
         if let context = self.extensionContext {
             var updatedIsExpanded: Bool?
-            if #available(iOSApplicationExtension 10.0, *) {
-                context.widgetLargestAvailableDisplayMode = .expanded
-                updatedIsExpanded = context.widgetActiveDisplayMode == .expanded
-                maximumSize = context.widgetMaximumSize(for: context.widgetActiveDisplayMode)
-            } else {
-                updatedIsExpanded = true
-                maximumSize = UIScreen.main.bounds.size
-                headerViewHeightConstraint.constant = 40
-                footerViewHeightConstraint.constant = 40
-            }
+            context.widgetLargestAvailableDisplayMode = .expanded
+            updatedIsExpanded = context.widgetActiveDisplayMode == .expanded
+            maximumSize = context.widgetMaximumSize(for: context.widgetActiveDisplayMode)
             if isExpanded != updatedIsExpanded {
                 isExpanded = updatedIsExpanded
                 updateViewPropertiesForIsExpanded(isExpanded ?? false)

                vc.viewCountAndSparklineContainerView.isHidden = true
            }
            
            if #available(iOSApplicationExtension 10.0, *) {
                if let imageURL = result.thumbnailURL {
                    vc.imageView.wmf_setImage(with: imageURL, detectFaces: true, onGPU: true, failure: { (error) in
                        vc.collapseImageAndWidenLabels = true
                    }) {
                        vc.collapseImageAndWidenLabels = false
                    }
                } else {
                    vc.collapseImageAndWidenLabels = true
                }
            } else {
                vc.collapseImageAndWidenLabels = true

    
    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
        super.viewWillTransition(to: size, with: coordinator)
        coordinator.animate(alongsideTransition: { (context) in
            self.layoutForSize(size)
        }) { (context) in
            if (!context.isAnimated) {
                self.layoutForSize(size)
            }
        }
    }
    
