Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
refactor: address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedbashir committed Aug 18, 2023
1 parent 6aef912 commit 09dac90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source/DiscoveryWebViewHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class DiscoveryWebViewHelper: NSObject {
}
}

let offSet = container.view.viewWithTag(FakeStatusBarViewTag)?.frame.size.height ?? 0
let offSet = container.view.viewWithTag(statuBarViewTag)?.frame.size.height ?? 0
titleView.snp.remakeConstraints { make in
make.top.equalTo(contentView).offset(offSet)
make.trailing.equalTo(contentView)
Expand Down
11 changes: 6 additions & 5 deletions Source/NewCourseDashboardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import UIKit

let FakeStatusBarViewTag: Int = 123454321
// view used at the exact same location of status bar in case of hidden navbar
let statuBarViewTag: Int = 123454321

public protocol NewCourseDashboardViewControllerDelegate: AnyObject {
func showCourseDates(bannerInfo: DatesBannerInfo?, delegate: CourseOutlineTableController?)
Expand Down Expand Up @@ -604,17 +605,17 @@ public extension UIViewController {
func setStatusBar(inside contentView: UIView? = nil, color: UIColor) {
let overView: UIView

if let contentView = contentView, let taggedView = contentView.viewWithTag(FakeStatusBarViewTag) {
if let contentView = contentView, let taggedView = contentView.viewWithTag(statuBarViewTag) {
overView = taggedView
} else if contentView != nil {
overView = UIView()
overView.tag = FakeStatusBarViewTag
overView.tag = statuBarViewTag
contentView?.addSubview(overView)
} else if let taggedView = view.viewWithTag(FakeStatusBarViewTag) {
} else if let taggedView = view.viewWithTag(statuBarViewTag) {
overView = taggedView
} else {
overView = UIView()
overView.tag = FakeStatusBarViewTag
overView.tag = statuBarViewTag
view.addSubview(overView)
}

Expand Down

0 comments on commit 09dac90

Please sign in to comment.