Skip to content

Commit fb5d1f8

Browse files
authored
Merge pull request #476 from jorgeblacio/remove_criptext_footer
Now there is an option to remove Criptext footer.
2 parents 6176ab4 + 3324284 commit fb5d1f8

File tree

12 files changed

+114
-20
lines changed

12 files changed

+114
-20
lines changed

NotificationExtension/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.1.17</string>
20+
<string>1.1.18</string>
2121
<key>CFBundleVersion</key>
22-
<string>2</string>
22+
<string>1</string>
2323
<key>NSExtension</key>
2424
<dict>
2525
<key>NSExtensionPointIdentifier</key>

ShareExtension/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.1.17</string>
20+
<string>1.1.18</string>
2121
<key>CFBundleVersion</key>
22-
<string>2</string>
22+
<string>1</string>
2323
<key>NSExtension</key>
2424
<dict>
2525
<key>NSExtensionAttributes</key>

iOS-Email-Client/AppDelegate.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,23 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
382382
newAccount["refreshToken"] = rToken
383383
}
384384
}
385+
if(oldSchemaVersion < 23) {
386+
migration.enumerateObjects(ofType: Account.className()){ (oldObject, newObject) in
387+
guard let newAccount = newObject else {
388+
return
389+
}
390+
newAccount["showCriptextFooter"] = true
391+
}
392+
migration.enumerateObjects(ofType: Label.className()){ (oldObject, newObject) in
393+
guard let newLabel = newObject,
394+
let labelId = newLabel["id"] as? Int else {
395+
return
396+
}
397+
if(labelId < 8) {
398+
newLabel["account"] = nil
399+
}
400+
}
401+
}
385402
})
386403

387404
// Tell Realm to use this new configuration object for the default Realm

iOS-Email-Client/AsyncTasks/SendMailAsyncTask.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,13 @@ class SendMailAsyncTask {
308308
guestEmailData["bcc"] = bccData.1
309309
}
310310
if !guestEmailData.isEmpty {
311-
guestEmailData["body"] = self.isSecure || myAccount.domain != Env.plainDomain ? self.body : "\(self.body)<br/><br/>\(Constants.footer)"
311+
var showFooter = true
312+
if(myAccount.domain != nil){
313+
showFooter = false
314+
} else {
315+
showFooter = myAccount.showCriptextFooter
316+
}
317+
guestEmailData["body"] = self.isSecure || !showFooter ? self.body : "\(self.body)<br/><br/>\(Constants.footer)"
312318
guestEmailData["encrypted"] = isSecure
313319

314320
var dummySession: SendEmailData.GuestContent?

iOS-Email-Client/Base.lproj/Main.storyboard

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,49 @@
381381
<outlet property="optionLabel" destination="VP3-8g-pra" id="aGi-dc-OeD"/>
382382
</connections>
383383
</tableViewCell>
384-
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="settingsGeneralHeader" id="3fm-8w-gPC" customClass="GeneralHeaderTableViewCell" customModule="iOS_Email_Client" customModuleProvider="target">
384+
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="settingsGeneralSwitch" id="AHT-qI-y0k" customClass="GeneralSwitchTableViewCell" customModule="iOS_Email_Client" customModuleProvider="target">
385385
<rect key="frame" x="0.0" y="98" width="375" height="44"/>
386386
<autoresizingMask key="autoresizingMask"/>
387+
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="AHT-qI-y0k" id="Sex-sL-tZR">
388+
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
389+
<autoresizingMask key="autoresizingMask"/>
390+
<subviews>
391+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Allow Notifications" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v00-sr-Yfq">
392+
<rect key="frame" x="27" y="11.333333333333336" width="143.66666666666666" height="21"/>
393+
<constraints>
394+
<constraint firstAttribute="height" constant="21" id="wex-tu-j82"/>
395+
</constraints>
396+
<fontDescription key="fontDescription" name="NunitoSans-Regular" family="Nunito Sans" pointSize="17"/>
397+
<color key="textColor" red="0.2156862745" green="0.2274509804" blue="0.27058823529999998" alpha="1" colorSpace="calibratedRGB"/>
398+
<nil key="highlightedColor"/>
399+
</label>
400+
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="arU-gF-3Ok">
401+
<rect key="frame" x="308" y="8" width="45" height="28"/>
402+
<constraints>
403+
<constraint firstAttribute="width" constant="43" id="SNs-gS-hFu"/>
404+
<constraint firstAttribute="height" constant="28" id="qUE-Ia-yNM"/>
405+
</constraints>
406+
<color key="onTintColor" red="0.0" green="0.56862745100000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
407+
<connections>
408+
<action selector="onSwitchToggle:" destination="AHT-qI-y0k" eventType="valueChanged" id="rBy-su-4cJ"/>
409+
</connections>
410+
</switch>
411+
</subviews>
412+
<constraints>
413+
<constraint firstItem="v00-sr-Yfq" firstAttribute="leading" secondItem="Sex-sL-tZR" secondAttribute="leading" constant="27" id="8Xk-ls-WgI"/>
414+
<constraint firstItem="v00-sr-Yfq" firstAttribute="centerY" secondItem="Sex-sL-tZR" secondAttribute="centerY" id="VfY-eL-biC"/>
415+
<constraint firstAttribute="trailing" secondItem="arU-gF-3Ok" secondAttribute="trailing" constant="24" id="j8X-Ce-iCr"/>
416+
<constraint firstItem="arU-gF-3Ok" firstAttribute="centerY" secondItem="Sex-sL-tZR" secondAttribute="centerY" id="oFl-Bg-3UK"/>
417+
</constraints>
418+
</tableViewCellContentView>
419+
<connections>
420+
<outlet property="availableSwitch" destination="arU-gF-3Ok" id="ZCL-1b-JOY"/>
421+
<outlet property="optionLabel" destination="v00-sr-Yfq" id="wIR-RV-P4U"/>
422+
</connections>
423+
</tableViewCell>
424+
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="settingsGeneralHeader" id="3fm-8w-gPC" customClass="GeneralHeaderTableViewCell" customModule="iOS_Email_Client" customModuleProvider="target">
425+
<rect key="frame" x="0.0" y="142" width="375" height="44"/>
426+
<autoresizingMask key="autoresizingMask"/>
387427
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="3fm-8w-gPC" id="NKl-o8-1bf">
388428
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
389429
<autoresizingMask key="autoresizingMask"/>
@@ -2070,7 +2110,7 @@
20702110
<autoresizingMask key="autoresizingMask"/>
20712111
<subviews>
20722112
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Recovery Email" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5uP-t7-uw8">
2073-
<rect key="frame" x="27" y="12" width="118" height="20"/>
2113+
<rect key="frame" x="27.000000000000007" y="10.333333333333334" width="116.66666666666669" height="23.333333333333329"/>
20742114
<fontDescription key="fontDescription" name="NunitoSans-Regular" family="Nunito Sans" pointSize="17"/>
20752115
<color key="textColor" red="0.2156862745" green="0.2274509804" blue="0.27058823529999998" alpha="1" colorSpace="calibratedRGB"/>
20762116
<nil key="highlightedColor"/>
@@ -2131,7 +2171,7 @@
21312171
<autoresizingMask key="autoresizingMask"/>
21322172
<subviews>
21332173
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Allow Notifications" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oia-Yg-nVZ">
2134-
<rect key="frame" x="27" y="11.333333333333336" width="141" height="21"/>
2174+
<rect key="frame" x="27" y="11.333333333333336" width="143.66666666666666" height="21"/>
21352175
<constraints>
21362176
<constraint firstAttribute="height" constant="21" id="KM9-WR-75r"/>
21372177
</constraints>
@@ -2210,7 +2250,7 @@
22102250
<autoresizingMask key="autoresizingMask"/>
22112251
<subviews>
22122252
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ACCOUNT" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ux7-oI-npn">
2213-
<rect key="frame" x="27" y="12.666666666666666" width="316" height="18.666666666666671"/>
2253+
<rect key="frame" x="27" y="11" width="316" height="22"/>
22142254
<fontDescription key="fontDescription" name="NunitoSans-Bold" family="Nunito Sans" pointSize="16"/>
22152255
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
22162256
<nil key="highlightedColor"/>
@@ -2878,16 +2918,16 @@
28782918
<nil key="highlightedColor"/>
28792919
</label>
28802920
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="ihN-It-mOc">
2881-
<rect key="frame" x="61" y="13" width="196" height="40"/>
2921+
<rect key="frame" x="61" y="16" width="196" height="34"/>
28822922
<subviews>
28832923
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Samsung Galaxy S8" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W2V-ek-PEc">
2884-
<rect key="frame" x="0.0" y="0.0" width="196" height="22"/>
2924+
<rect key="frame" x="0.0" y="0.0" width="196" height="18.666666666666668"/>
28852925
<fontDescription key="fontDescription" name="NunitoSans-Regular" family="Nunito Sans" pointSize="16"/>
28862926
<nil key="textColor"/>
28872927
<nil key="highlightedColor"/>
28882928
</label>
28892929
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Guayaquil - 12 hours ago" textAlignment="natural" lineBreakMode="characterWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bk9-Eh-HeG">
2890-
<rect key="frame" x="0.0" y="22" width="196" height="18"/>
2930+
<rect key="frame" x="0.0" y="18.666666666666664" width="196" height="15.333333333333336"/>
28912931
<fontDescription key="fontDescription" name="NunitoSans-Regular" family="Nunito Sans" pointSize="13"/>
28922932
<nil key="textColor"/>
28932933
<nil key="highlightedColor"/>
@@ -2934,7 +2974,7 @@
29342974
<autoresizingMask key="autoresizingMask"/>
29352975
<subviews>
29362976
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cryptext System Version 1.3.1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tcn-qz-XOX">
2937-
<rect key="frame" x="27" y="21" width="321" height="23.666666666666671"/>
2977+
<rect key="frame" x="27" y="23" width="321" height="20"/>
29382978
<fontDescription key="fontDescription" name="NunitoSans-Regular" family="Nunito Sans" pointSize="17"/>
29392979
<color key="textColor" red="0.72549019609999998" green="0.72549019609999998" blue="0.72549019609999998" alpha="1" colorSpace="calibratedRGB"/>
29402980
<nil key="highlightedColor"/>

0 commit comments

Comments
 (0)