Manos Chorianopoulos

fix empty rewardsView

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -763,10 +763,10 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Et1-y7-npI" userLabel="HeaderView">
<rect key="frame" x="0.0" y="0.0" width="414" height="175"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="181"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_background_circle" translatesAutoresizingMaskIntoConstraints="NO" id="wP5-YG-vSP">
<rect key="frame" x="0.0" y="0.0" width="414" height="175"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="181"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wJv-NF-rMf">
<rect key="frame" x="174.5" y="30" width="65" height="65"/>
......@@ -782,7 +782,7 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UNL-Oh-sPV">
<rect key="frame" x="176.5" y="131" width="61" height="24"/>
<rect key="frame" x="176.5" y="131" width="61" height="30"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="14"/>
<inset key="contentEdgeInsets" minX="10" minY="5" maxX="10" maxY="5"/>
......@@ -814,16 +814,16 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ukv-zL-7sQ">
<rect key="frame" x="0.0" y="175" width="414" height="488"/>
<rect key="frame" x="0.0" y="181" width="414" height="482"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="COSMOTE Επιβράβευση" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BXF-rK-wmD">
<rect key="frame" x="20" y="30" width="374" height="249"/>
<rect key="frame" x="20" y="30" width="374" height="243"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="21"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DVa-Te-Sw4" userLabel="BadgesView">
<rect key="frame" x="0.0" y="293" width="414" height="195"/>
<rect key="frame" x="0.0" y="287" width="414" height="195"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_badge_lines" translatesAutoresizingMaskIntoConstraints="NO" id="1Zm-yc-xEI">
<rect key="frame" x="7" y="50" width="400" height="80"/>
......@@ -1007,6 +1007,7 @@
<constraint firstAttribute="trailing" secondItem="DVa-Te-Sw4" secondAttribute="trailing" id="DVL-xb-SoS"/>
<constraint firstItem="BXF-rK-wmD" firstAttribute="leading" secondItem="Ukv-zL-7sQ" secondAttribute="leading" constant="20" id="If1-7K-I0v"/>
<constraint firstAttribute="bottom" secondItem="DVa-Te-Sw4" secondAttribute="bottom" id="Pkq-41-lNE"/>
<constraint firstAttribute="height" constant="482" id="gon-df-lCc"/>
<constraint firstItem="BXF-rK-wmD" firstAttribute="top" secondItem="Ukv-zL-7sQ" secondAttribute="top" constant="30" id="zGx-VM-5zU"/>
</constraints>
</view>
......@@ -1237,7 +1238,7 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8YP-uG-vbV">
<rect key="frame" x="20" y="205" width="374" height="458"/>
<rect key="frame" x="20" y="211" width="374" height="452"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="aYf-dv-3Ik">
<rect key="frame" x="149.5" y="0.0" width="75" height="75"/>
......@@ -1712,6 +1713,7 @@
<outlet property="questionnaireButton" destination="UNL-Oh-sPV" id="EPs-OW-Oai"/>
<outlet property="rewardsLabel" destination="BXF-rK-wmD" id="OXr-Xm-cgX"/>
<outlet property="rewardsView" destination="Ukv-zL-7sQ" id="GgM-WZ-8Wm"/>
<outlet property="rewardsViewHeight" destination="gon-df-lCc" id="YAV-U7-dEG"/>
<outlet property="sumBadgeImage" destination="J7v-XB-iCp" id="TW3-lb-CJu"/>
<outlet property="sumBadgeLabel" destination="E1I-Ms-Wub" id="bQy-8X-MhK"/>
<outlet property="tableView" destination="jYz-96-Lp1" id="VZ8-9Y-cax"/>
......
......@@ -45,6 +45,7 @@ import SwiftEventBus
@IBOutlet weak var activeCodeContentView: UIView!
@IBOutlet weak var activeCodeContentViewHeight: NSLayoutConstraint!
@IBOutlet weak var rewardsView: UIView!
@IBOutlet weak var rewardsViewHeight: NSLayoutConstraint!
@IBOutlet weak var rewardsLabel: UILabel!
@IBOutlet weak var sumBadgeImage: UIImageView!
@IBOutlet weak var sumBadgeLabel: UILabel!
......@@ -433,8 +434,10 @@ import SwiftEventBus
// TODO: FIX emptyView check - add market badge check
if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0) {
rewardsView.isHidden = true
rewardsViewHeight.constant = 0
} else {
rewardsView.isHidden = false
rewardsViewHeight.constant = rewardsView.intrinsicContentSize.height
}
// TODO: FIX emptyView check - add market badge check
......