flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
594 stars 40 forks source link

Explicitly unwrap UIScreen.main before accesing its scale property #321

Closed rikner closed 3 years ago

rikner commented 3 years ago

Type of change:

Motivation (current vs expected behavior)

Since UIScreen.main is an implicitly unwrapped optional, it would be safer to check it for nil before using its scale property.

Please check if the PR fulfills these requirements

codecov[bot] commented 3 years ago

Codecov Report

Merging #321 (87c5df6) into master (0e44ce4) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #321      +/-   ##
==========================================
+ Coverage   51.42%   51.44%   +0.01%     
==========================================
  Files          87       87              
  Lines        2872     2873       +1     
==========================================
+ Hits         1477     1478       +1     
  Misses       1395     1395              
Impacted Files Coverage Δ
Sources/UIView.swift 90.42% <100.00%> (+0.05%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0e44ce4...87c5df6. Read the comment docs.