fix: Prevent crash for nil values
This commit is contained in:
@@ -28,7 +28,11 @@ class SegnalazioniLast24HoursCell: EQNBaseTableViewCell {
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
@objc func updateUI(for smartphoneNetwork: EQNReteSmartphone) {
|
||||
@objc func updateUI(for smartphoneNetwork: EQNReteSmartphone?) {
|
||||
guard let smartphoneNetwork = smartphoneNetwork else {
|
||||
return
|
||||
}
|
||||
|
||||
self.mildReportsLabel.text = "\(smartphoneNetwork.manualGreen)"
|
||||
self.strongReportsLabel.text = "\(smartphoneNetwork.manualYellow)"
|
||||
self.veryStrongReportsLabel.text = "\(smartphoneNetwork.manualRed)"
|
||||
|
||||
@@ -399,10 +399,10 @@ In più sostieni il progetto di ricerca il quale non riceve finanziamenti estern
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="CIy-Xw-DPT">
|
||||
<rect key="frame" x="90.5" y="36" width="217" height="40"/>
|
||||
<rect key="frame" x="96" y="36" width="206" height="40"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="F6p-LB-rf1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="73.5" height="40"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="58" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="star_report_green" translatesAutoresizingMaskIntoConstraints="NO" id="mgL-cx-R59">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
@@ -411,8 +411,8 @@ In più sostieni il progetto di ricerca il quale non riceve finanziamenti estern
|
||||
<constraint firstAttribute="width" constant="40" id="VJU-lq-FYa"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" tag="1" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="36" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="KI7-0R-pnR">
|
||||
<rect key="frame" x="42" y="0.0" width="31.5" height="40"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" tag="1" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="KI7-0R-pnR">
|
||||
<rect key="frame" x="42" y="0.0" width="16" height="40"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
|
||||
<color key="textColor" red="0.0039215686274509803" green="0.70588235294117641" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -420,13 +420,13 @@ In più sostieni il progetto di ricerca il quale non riceve finanziamenti estern
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="dGB-gN-jfX">
|
||||
<rect key="frame" x="89.5" y="0.0" width="57.5" height="40"/>
|
||||
<rect key="frame" x="74" y="0.0" width="58" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="star_report_yellow" translatesAutoresizingMaskIntoConstraints="NO" id="EGl-dn-mvX">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" tag="2" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="jMx-Or-mvH">
|
||||
<rect key="frame" x="42" y="0.0" width="15.5" height="40"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" tag="2" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="jMx-Or-mvH">
|
||||
<rect key="frame" x="42" y="0.0" width="16" height="40"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
|
||||
<color key="textColor" red="0.90980392156862744" green="0.85490196078431369" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -434,13 +434,13 @@ In più sostieni il progetto di ricerca il quale non riceve finanziamenti estern
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="8Bn-7y-chQ">
|
||||
<rect key="frame" x="163" y="0.0" width="54" height="40"/>
|
||||
<rect key="frame" x="148" y="0.0" width="58" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="star_report_red" translatesAutoresizingMaskIntoConstraints="NO" id="jjO-u4-ID9">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" tag="3" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="JAu-kk-n4H">
|
||||
<rect key="frame" x="42" y="0.0" width="12" height="40"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" tag="3" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="JAu-kk-n4H">
|
||||
<rect key="frame" x="42" y="0.0" width="16" height="40"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
|
||||
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
||||
Reference in New Issue
Block a user