Skip to content

Commit

Permalink
feat: update SettingsViewController.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajhilje committed Nov 8, 2023
1 parent 44ae5c2 commit d0450f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 5 additions & 7 deletions IVPNClient/Scenes/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<color key="sectionIndexBackgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<view key="tableFooterView" contentMode="scaleToFill" id="zK0-8u-72W">
<rect key="frame" x="0.0" y="1287.5" width="414" height="65"/>
<rect key="frame" x="0.0" y="1365.5" width="414" height="65"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="VERSION 0.0.0 (0)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gBW-V1-BW0">
Expand Down Expand Up @@ -572,7 +572,7 @@
<rect key="frame" x="0.0" y="1115.5" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="nkk-5l-3RI" id="LC6-Ay-5Vd">
<rect key="frame" x="0.0" y="0.0" width="395.5" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="383.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Advanced" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sjf-EM-fVB">
Expand All @@ -592,9 +592,6 @@
<constraint firstAttribute="trailing" secondItem="sjf-EM-fVB" secondAttribute="trailing" constant="8" id="xlE-Ht-AfL"/>
</constraints>
</tableViewCellContentView>
<connections>
<segue destination="cNW-I9-ie7" kind="show" id="Y74-yj-Ppr"/>
</connections>
</tableViewCell>
</cells>
</tableViewSection>
Expand All @@ -604,7 +601,7 @@
<rect key="frame" x="0.0" y="1215.5" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jRI-M6-wda" id="zNB-rZ-BcC">
<rect key="frame" x="0.0" y="0.0" width="395.5" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="383.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Terms of Service" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ySb-bc-aGO">
Expand All @@ -629,7 +626,7 @@
<rect key="frame" x="0.0" y="1259.5" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QbD-lg-XeY" id="AR6-tI-Bcz">
<rect key="frame" x="0.0" y="0.0" width="395.5" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="383.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Privacy Policy" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="467-bH-Ba8">
Expand Down Expand Up @@ -705,6 +702,7 @@
<outlet property="showIPv4ServersSwitch" destination="hV9-LW-jwe" id="NzW-gv-njt"/>
<outlet property="versionLabel" destination="gBW-V1-BW0" id="Xo2-nd-tuj"/>
<segue destination="C8Y-kZ-eYV" kind="show" identifier="SelectProtocol" id="oZ9-fT-UYA"/>
<segue destination="cNW-I9-ie7" kind="show" identifier="SelectAdvanced" id="dV8-vO-Svr"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="38h-j6-UdB" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,15 @@ extension SettingsViewController {
contactSupport()
}

if indexPath.section == 4 && indexPath.row == 0 {
guard evaluateIsLoggedIn() else {
tableView.deselectRow(at: indexPath, animated: true)
return
}

performSegue(withIdentifier: "SelectAdvanced", sender: nil)
}

if indexPath.section == 1 && indexPath.row == 0 {
tableView.deselectRow(at: indexPath, animated: true)

Expand Down

0 comments on commit d0450f0

Please sign in to comment.