Various design and UI consistency improvements.

• updated iconography
• lines and sizing
• empty inbox and archive screen with wording
• bug fix on calling to self being enabled sometimes (doesn't crash either way, but makes little sense)
• call icons and group update icons incorporated (PR to JSQ must be merged to test; this will be two lines on the Signal-iOS side to remove if we decide not to go with icons)
• fingerprint screen working: accessible by long press from contact screen on contact title. long press on lower half of screen shreds key material after confirmation. new icons for scan and show.
• short press on contact title will show their phone number
• color updates to new palette for green, yellow and light blue
This commit is contained in:
Christine Corbett 2015-01-27 10:17:49 -10:00 committed by Frederic Jacobs
parent 6278152ad2
commit aca02221be
13 changed files with 355 additions and 130 deletions

View File

@ -37,14 +37,14 @@ PODS:
- JSQMessagesViewController (6.1.1):
- JSQSystemSoundPlayer (~> 2.0.0)
- JSQSystemSoundPlayer (2.0.1)
- libPhoneNumber-iOS (0.7.5)
- Mantle (1.5.1):
- Mantle/extobjc (= 1.5.1)
- Mantle/extobjc (1.5.1)
- libPhoneNumber-iOS (0.7.6)
- Mantle (1.5.4):
- Mantle/extobjc (= 1.5.4)
- Mantle/extobjc (1.5.4)
- OpenSSL (1.0.200)
- PastelogKit (1.2):
- CocoaLumberjack (~> 1.9)
- ProtocolBuffers (1.9.3)
- ProtocolBuffers (1.9.7)
- SCWaveformView (1.0.0)
- SocketRocket (0.3.1-beta2)
- SQLCipher/common (3.1.0)
@ -97,7 +97,7 @@ CHECKOUT OPTIONS:
:commit: cf63307d5e3833b16caa9a07f3b5ea06359913f9
:git: https://github.com/corbett/APDropDownNavToolbar.git
JSQMessagesViewController:
:commit: c8262eee36cf84eded334062dc80e1f2a1c495ab
:commit: 26fb5cbcf4a2bf15b6f384d29028b15a5e1a62f5
:git: https://github.com/WhisperSystems/JSQMessagesViewController
SocketRocket:
:commit: 954750c018
@ -114,11 +114,11 @@ SPEC CHECKSUMS:
HKDFKit: 5998cf1bbb611e7ecc6bd3eaaef8c7a7da7be949
JSQMessagesViewController: 554430bbaeb0b2dbed8d4aaa2bdf64559e67f353
JSQSystemSoundPlayer: 55528c699a283aae2220d3ae7b8b527d2ecef4b4
libPhoneNumber-iOS: 16b9556d7fdf4819eabeb7b7356fea3373fa47f9
Mantle: d7c5ac734579ec751c58fecbf56189853056c58c
libPhoneNumber-iOS: d4316d494d4997c40a6059faf35a970d7f4eb1c0
Mantle: d5fbaf30fbc58031223af13812c060e15934a1fe
OpenSSL: 4c7be3eca71139f52984542d8c4c0752154d26c3
PastelogKit: 8bab71b1d187617a83e7124cffe9eb1a600e6695
ProtocolBuffers: e80f9e4fc401aec9d3c30be70db87fcd5f1cb880
ProtocolBuffers: 37fdd327d36856f965ea9029b5ec0c7120e3a452
SCWaveformView: 55f0cd6e80df1a46ff70892bc4041f5b7d8ad43c
SocketRocket: 9cbe08469513356cddc0afcab1ff160bd190296a
SQLCipher: 981110217eb93c2779c34fb59e646a1c1da918d8

2
Pods

@ -1 +1 @@
Subproject commit 8bf6fdd6c8a4c4e48c41814734e8709ba2396e6f
Subproject commit a824d242dc20309948cd9a0396c3f1265473986e

View File

@ -19,7 +19,7 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uoq-UX-3fJ">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uoq-UX-3fJ" userLabel="toolbar like view">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DfA-eN-PyK" userLabel="box icon">
@ -90,7 +90,9 @@
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<rect key="contentStretch" x="0.0" y="0.0" width="1" height="0.5"/>
<constraints>
<constraint firstAttribute="height" id="WuF-7s-PGe"/>
<constraint firstAttribute="height" id="WuF-7s-PGe">
<variation key="heightClass=regular-widthClass=compact" constant="1"/>
</constraint>
</constraints>
<variation key="default">
<mask key="constraints">
@ -109,7 +111,7 @@
<constraint firstAttribute="width" constant="24" id="HGR-Rl-oe8"/>
<constraint firstAttribute="height" constant="21" id="lqu-cE-Dfh"/>
</constraints>
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="13"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="15"/>
<color key="textColor" red="0.12549019607843137" green="0.56470588235294117" blue="0.91764705882352937" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<variation key="default">
@ -125,6 +127,29 @@
</mask>
</variation>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Q8M-tN-1ve">
<rect key="frame" x="20" y="60" width="400" height="1"/>
<color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="c6T-vV-GsL">
<variation key="heightClass=regular-widthClass=compact" constant="1"/>
</constraint>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="c6T-vV-GsL"/>
</mask>
</variation>
<variation key="heightClass=regular" ambiguous="YES">
<rect key="frame" x="0.0" y="0.0" width="0.0" height="0.0"/>
</variation>
<variation key="heightClass=regular-widthClass=compact" ambiguous="YES" misplaced="YES">
<rect key="frame" x="0.0" y="0.0" width="440" height="1"/>
<mask key="constraints">
<include reference="c6T-vV-GsL"/>
</mask>
</variation>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
@ -132,8 +157,10 @@
<constraint firstAttribute="trailing" secondItem="hSN-Ka-PzS" secondAttribute="trailing" id="615-3N-9QN"/>
<constraint firstItem="WVY-Zl-dpP" firstAttribute="top" secondItem="uoq-UX-3fJ" secondAttribute="top" id="77j-Xx-EHO"/>
<constraint firstAttribute="trailing" secondItem="WVY-Zl-dpP" secondAttribute="trailing" constant="66" id="8iQ-re-cvy"/>
<constraint firstAttribute="bottom" secondItem="Q8M-tN-1ve" secondAttribute="bottom" constant="65" id="8x2-HZ-R58"/>
<constraint firstAttribute="centerX" secondItem="hSN-Ka-PzS" secondAttribute="centerX" id="AGV-i5-F3D"/>
<constraint firstAttribute="bottom" secondItem="WVY-Zl-dpP" secondAttribute="bottom" id="HWa-M6-gjL"/>
<constraint firstItem="Q8M-tN-1ve" firstAttribute="top" secondItem="uoq-UX-3fJ" secondAttribute="top" id="INk-NO-2j1"/>
<constraint firstItem="hSN-Ka-PzS" firstAttribute="top" secondItem="uoq-UX-3fJ" secondAttribute="top" id="Pq1-0y-L80"/>
<constraint firstAttribute="bottom" secondItem="DfA-eN-PyK" secondAttribute="bottom" id="SJd-sZ-n13"/>
<constraint firstItem="DfA-eN-PyK" firstAttribute="centerX" secondItem="GV1-fp-iPR" secondAttribute="centerX" id="UgY-Jr-rPo"/>
@ -145,6 +172,9 @@
<constraint firstAttribute="height" constant="66" id="lM2-AA-dzm"/>
<constraint firstItem="DfA-eN-PyK" firstAttribute="top" secondItem="GV1-fp-iPR" secondAttribute="top" constant="-18" id="lZW-eB-ucq"/>
<constraint firstItem="DfA-eN-PyK" firstAttribute="leading" secondItem="uoq-UX-3fJ" secondAttribute="leading" constant="66" id="tIb-ee-zav"/>
<constraint firstAttribute="bottom" secondItem="Q8M-tN-1ve" secondAttribute="bottom" constant="65" id="wH6-nS-CoX">
<variation key="heightClass=regular-widthClass=compact" constant="63"/>
</constraint>
</constraints>
<variation key="default">
<mask key="subviews">
@ -152,6 +182,7 @@
<exclude reference="WVY-Zl-dpP"/>
<exclude reference="hSN-Ka-PzS"/>
<exclude reference="GV1-fp-iPR"/>
<exclude reference="Q8M-tN-1ve"/>
</mask>
<mask key="constraints">
<exclude reference="lM2-AA-dzm"/>
@ -167,6 +198,9 @@
<exclude reference="HWa-M6-gjL"/>
<exclude reference="YSd-C9-yEn"/>
<exclude reference="Ydg-FL-fwr"/>
<exclude reference="8x2-HZ-R58"/>
<exclude reference="INk-NO-2j1"/>
<exclude reference="wH6-nS-CoX"/>
<exclude reference="615-3N-9QN"/>
<exclude reference="AGV-i5-F3D"/>
<exclude reference="Pq1-0y-L80"/>
@ -179,6 +213,7 @@
<include reference="WVY-Zl-dpP"/>
<include reference="hSN-Ka-PzS"/>
<include reference="GV1-fp-iPR"/>
<include reference="Q8M-tN-1ve"/>
</mask>
<mask key="constraints">
<include reference="lM2-AA-dzm"/>
@ -194,6 +229,9 @@
<exclude reference="HWa-M6-gjL"/>
<exclude reference="YSd-C9-yEn"/>
<exclude reference="Ydg-FL-fwr"/>
<exclude reference="8x2-HZ-R58"/>
<exclude reference="INk-NO-2j1"/>
<include reference="wH6-nS-CoX"/>
<include reference="615-3N-9QN"/>
<include reference="AGV-i5-F3D"/>
<include reference="Pq1-0y-L80"/>
@ -201,14 +239,92 @@
</mask>
</variation>
</view>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="uiEmptyArchive" translatesAutoresizingMaskIntoConstraints="NO" id="TL0-JW-QbT">
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
<color key="backgroundColor" red="0.99989169836044312" green="1" blue="0.99988096952438354" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<variation key="heightClass=regular-widthClass=compact" misplaced="YES">
<rect key="frame" x="0.0" y="64" width="410" height="671"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lKc-rv-FH5" userLabel="empty state view">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="uiEmptyArchive" translatesAutoresizingMaskIntoConstraints="NO" id="Off-ZL-54G">
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
<constraints>
<constraint firstAttribute="height" constant="140" id="QR5-Mr-y2f">
<variation key="heightClass=regular-widthClass=compact" constant="110"/>
</constraint>
<constraint firstAttribute="width" constant="140" id="s4O-an-5Lc">
<variation key="heightClass=regular-widthClass=compact" constant="115"/>
</constraint>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="QR5-Mr-y2f"/>
<exclude reference="s4O-an-5Lc"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="constraints">
<include reference="QR5-Mr-y2f"/>
<include reference="s4O-an-5Lc"/>
</mask>
</variation>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No Messages :( Tap Compose to send a message or invite a friend to Signal" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Srx-i1-WhD">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="66" id="GEd-dY-d8r"/>
<constraint firstAttribute="width" constant="250" id="siA-1a-pO1"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
<variation key="default">
<mask key="constraints">
<exclude reference="GEd-dY-d8r"/>
<exclude reference="siA-1a-pO1"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="constraints">
<include reference="GEd-dY-d8r"/>
<include reference="siA-1a-pO1"/>
</mask>
</variation>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="centerX" secondItem="Srx-i1-WhD" secondAttribute="centerX" id="JId-fq-hNc"/>
<constraint firstItem="Off-ZL-54G" firstAttribute="top" secondItem="lKc-rv-FH5" secondAttribute="top" constant="100" id="RYC-6Y-t2Q"/>
<constraint firstAttribute="centerX" secondItem="Off-ZL-54G" secondAttribute="centerX" constant="5" id="SyY-V9-AiU">
<variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
</constraint>
<constraint firstItem="Srx-i1-WhD" firstAttribute="top" secondItem="Off-ZL-54G" secondAttribute="top" constant="160" id="XOD-ug-Wc7">
<variation key="heightClass=regular-widthClass=compact" constant="140"/>
</constraint>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="Off-ZL-54G"/>
<exclude reference="Srx-i1-WhD"/>
</mask>
<mask key="constraints">
<exclude reference="JId-fq-hNc"/>
<exclude reference="XOD-ug-Wc7"/>
<exclude reference="RYC-6Y-t2Q"/>
<exclude reference="SyY-V9-AiU"/>
</mask>
</variation>
</imageView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="PaA-ol-uQT">
<variation key="heightClass=regular-widthClass=compact">
<mask key="subviews">
<include reference="Off-ZL-54G"/>
<include reference="Srx-i1-WhD"/>
</mask>
<mask key="constraints">
<include reference="JId-fq-hNc"/>
<include reference="XOD-ug-Wc7"/>
<include reference="RYC-6Y-t2Q"/>
<include reference="SyY-V9-AiU"/>
</mask>
</variation>
</view>
<tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="PaA-ol-uQT">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
@ -223,9 +339,6 @@
</tableViewCell>
</prototypes>
<sections/>
<variation key="heightClass=regular-widthClass=compact" misplaced="YES">
<rect key="frame" x="0.0" y="64" width="410" height="671"/>
</variation>
<connections>
<outlet property="dataSource" destination="MY2-bB-USa" id="kop-Y6-6DR"/>
<outlet property="delegate" destination="MY2-bB-USa" id="vmj-PA-2Od"/>
@ -235,21 +348,29 @@
<constraints>
<constraint firstAttribute="centerX" secondItem="uoq-UX-3fJ" secondAttribute="centerX" constant="-5" id="6gc-oZ-IMJ"/>
<constraint firstItem="7uh-gm-z8v" firstAttribute="top" secondItem="uoq-UX-3fJ" secondAttribute="bottom" id="7iL-hd-xP7"/>
<constraint firstItem="TL0-JW-QbT" firstAttribute="width" secondItem="EFA-Fu-XJm" secondAttribute="width" id="9eN-l2-dkv">
<variation key="heightClass=regular-widthClass=compact" constant="10"/>
</constraint>
<constraint firstAttribute="width" secondItem="uoq-UX-3fJ" secondAttribute="width" id="AP2-DE-zts"/>
<constraint firstAttribute="width" secondItem="lKc-rv-FH5" secondAttribute="width" id="Bu7-qv-yue"/>
<constraint firstAttribute="width" secondItem="lKc-rv-FH5" secondAttribute="width" id="EYc-tW-W2D">
<variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
</constraint>
<constraint firstAttribute="trailingMargin" secondItem="PaA-ol-uQT" secondAttribute="trailing" constant="-16" id="EdI-ia-IjN">
<variation key="heightClass=regular-widthClass=compact" constant="-26"/>
</constraint>
<constraint firstAttribute="trailingMargin" secondItem="uoq-UX-3fJ" secondAttribute="trailing" constant="-16" id="Fc5-tN-hro"/>
<constraint firstItem="7uh-gm-z8v" firstAttribute="top" secondItem="uoq-UX-3fJ" secondAttribute="bottom" id="GCa-EH-8Vh"/>
<constraint firstItem="uoq-UX-3fJ" firstAttribute="leading" secondItem="EFA-Fu-XJm" secondAttribute="leadingMargin" constant="-16" id="La3-rh-BpY"/>
<constraint firstItem="7uh-gm-z8v" firstAttribute="top" secondItem="TL0-JW-QbT" secondAttribute="bottom" constant="65" id="LzX-41-FwR">
<variation key="heightClass=regular-widthClass=compact" constant="66"/>
<constraint firstAttribute="trailingMargin" secondItem="uoq-UX-3fJ" secondAttribute="trailing" constant="-16" id="Fc5-tN-hro">
<variation key="heightClass=regular-widthClass=compact" constant="-16"/>
</constraint>
<constraint firstItem="7uh-gm-z8v" firstAttribute="top" secondItem="uoq-UX-3fJ" secondAttribute="bottom" id="GCa-EH-8Vh"/>
<constraint firstItem="lKc-rv-FH5" firstAttribute="top" secondItem="lZK-q4-iwt" secondAttribute="bottom" id="KiY-Ag-0iP"/>
<constraint firstItem="uoq-UX-3fJ" firstAttribute="leading" secondItem="EFA-Fu-XJm" secondAttribute="leadingMargin" constant="-16" id="La3-rh-BpY"/>
<constraint firstItem="PaA-ol-uQT" firstAttribute="leading" secondItem="EFA-Fu-XJm" secondAttribute="leadingMargin" constant="-16" id="OD6-Pc-Zug"/>
<constraint firstItem="TL0-JW-QbT" firstAttribute="top" secondItem="lZK-q4-iwt" secondAttribute="bottom" id="jlZ-yQ-LLc"/>
<constraint firstAttribute="centerX" secondItem="uoq-UX-3fJ" secondAttribute="centerX" id="fEl-Ut-x0g"/>
<constraint firstItem="7uh-gm-z8v" firstAttribute="top" secondItem="lKc-rv-FH5" secondAttribute="bottom" constant="66" id="lCx-f0-NYv"/>
<constraint firstAttribute="trailingMargin" secondItem="lKc-rv-FH5" secondAttribute="trailing" constant="-26" id="luy-6c-SFS">
<variation key="heightClass=regular-widthClass=compact" constant="-10"/>
</constraint>
<constraint firstAttribute="centerX" secondItem="lKc-rv-FH5" secondAttribute="centerX" constant="-5" id="obF-St-qwu">
<variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
</constraint>
<constraint firstItem="PaA-ol-uQT" firstAttribute="top" secondItem="lZK-q4-iwt" secondAttribute="bottom" id="ouV-vM-Vyv">
<variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
</constraint>
@ -258,55 +379,60 @@
<variation key="heightClass=regular-widthClass=compact" constant="10"/>
</constraint>
<constraint firstItem="uoq-UX-3fJ" firstAttribute="top" secondItem="lZK-q4-iwt" secondAttribute="bottom" constant="-1" id="xlM-od-Zuu"/>
<constraint firstAttribute="trailingMargin" secondItem="TL0-JW-QbT" secondAttribute="trailing" constant="-26" id="yfL-K8-woe"/>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="uoq-UX-3fJ"/>
<exclude reference="TL0-JW-QbT"/>
<exclude reference="lKc-rv-FH5"/>
<exclude reference="PaA-ol-uQT"/>
</mask>
<mask key="constraints">
<exclude reference="7iL-hd-xP7"/>
<exclude reference="GCa-EH-8Vh"/>
<exclude reference="LzX-41-FwR"/>
<exclude reference="lCx-f0-NYv"/>
<exclude reference="s5v-Hl-a3k"/>
<exclude reference="9eN-l2-dkv"/>
<exclude reference="jlZ-yQ-LLc"/>
<exclude reference="yfL-K8-woe"/>
<exclude reference="EdI-ia-IjN"/>
<exclude reference="OD6-Pc-Zug"/>
<exclude reference="ouV-vM-Vyv"/>
<exclude reference="wn4-O9-ILm"/>
<exclude reference="Bu7-qv-yue"/>
<exclude reference="EYc-tW-W2D"/>
<exclude reference="KiY-Ag-0iP"/>
<exclude reference="luy-6c-SFS"/>
<exclude reference="obF-St-qwu"/>
<exclude reference="6gc-oZ-IMJ"/>
<exclude reference="AP2-DE-zts"/>
<exclude reference="Fc5-tN-hro"/>
<exclude reference="La3-rh-BpY"/>
<exclude reference="fEl-Ut-x0g"/>
<exclude reference="xlM-od-Zuu"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="subviews">
<include reference="uoq-UX-3fJ"/>
<include reference="TL0-JW-QbT"/>
<include reference="lKc-rv-FH5"/>
<include reference="PaA-ol-uQT"/>
</mask>
<mask key="constraints">
<include reference="7iL-hd-xP7"/>
<exclude reference="GCa-EH-8Vh"/>
<include reference="LzX-41-FwR"/>
<include reference="lCx-f0-NYv"/>
<include reference="s5v-Hl-a3k"/>
<include reference="9eN-l2-dkv"/>
<include reference="jlZ-yQ-LLc"/>
<include reference="yfL-K8-woe"/>
<include reference="EdI-ia-IjN"/>
<exclude reference="OD6-Pc-Zug"/>
<include reference="ouV-vM-Vyv"/>
<include reference="wn4-O9-ILm"/>
<include reference="Bu7-qv-yue"/>
<exclude reference="EYc-tW-W2D"/>
<include reference="KiY-Ag-0iP"/>
<exclude reference="luy-6c-SFS"/>
<include reference="obF-St-qwu"/>
<exclude reference="6gc-oZ-IMJ"/>
<include reference="AP2-DE-zts"/>
<include reference="Fc5-tN-hro"/>
<include reference="La3-rh-BpY"/>
<include reference="fEl-Ut-x0g"/>
<exclude reference="xlM-od-Zuu"/>
</mask>
</variation>
@ -335,7 +461,8 @@
</navigationItem>
<connections>
<outlet property="archiveButton" destination="WVY-Zl-dpP" id="IdE-Kz-1r0"/>
<outlet property="emptyBoxImage" destination="TL0-JW-QbT" id="PTJ-VQ-CBF"/>
<outlet property="emptyBoxImage" destination="Off-ZL-54G" id="X6W-ws-noW"/>
<outlet property="emptyBoxLabel" destination="Srx-i1-WhD" id="wap-un-Cz5"/>
<outlet property="inboxButton" destination="DfA-eN-PyK" id="p0D-Qj-YzC"/>
<outlet property="inboxCountLabel" destination="GV1-fp-iPR" id="MHq-Gs-bgt"/>
<outlet property="tableView" destination="PaA-ol-uQT" id="nQU-tR-wbL"/>
@ -345,7 +472,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dE8-zB-mtF" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-5310" y="-1624.5"/>
<point key="canvasLocation" x="-5349" y="-1624.5"/>
</scene>
<!--Title-->
<scene sceneID="QqV-z2-xRW">
@ -414,9 +541,6 @@
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<segue destination="7qX-e8-QDY" kind="show" identifier="" id="J8E-Ia-LuP"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AwQ-ec-WBO">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
@ -435,7 +559,7 @@
</mask>
</variation>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="qr_scan_fingerprint.png" translatesAutoresizingMaskIntoConstraints="NO" id="HyV-ht-MrM">
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="btnCamera--white" translatesAutoresizingMaskIntoConstraints="NO" id="HyV-ht-MrM">
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
<constraints>
<constraint firstAttribute="height" constant="75" id="Yxr-T5-Jck"/>
@ -593,7 +717,7 @@ A0 09 9A FF A8 8A 09 99</string>
</mask>
</variation>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B4o-Rc-z68" userLabel="My Fingerprint">
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B4o-Rc-z68" userLabel="My Fingerprint">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wGB-4p-e1Z">
@ -604,9 +728,6 @@ A0 09 9A FF A8 8A 09 99</string>
<variation key="heightClass=regular-widthClass=compact" fixedFrame="YES">
<rect key="frame" x="0.0" y="0.0" width="400" height="220"/>
</variation>
<connections>
<segue destination="in8-UP-6ff" kind="showDetail" identifier="PresentIdentityQRCodeViewSegue" id="586-xP-XOB"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your Fingerprint" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5De-Jq-XWv">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
@ -627,7 +748,7 @@ A0 09 9A FF A8 8A 09 99</string>
</mask>
</variation>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="qr.png" translatesAutoresizingMaskIntoConstraints="NO" id="YOs-e5-ee3">
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="btnQRShow--white" highlightedImage="btnQRShow--white-1" translatesAutoresizingMaskIntoConstraints="NO" id="YOs-e5-ee3">
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
<constraints>
<constraint firstAttribute="width" constant="75" id="5IR-xd-6uL"/>
@ -1050,6 +1171,8 @@ A0 09 9A FF A8 8A 09 99</string>
<outlet property="userFingerprintLabel" destination="e7E-iS-3Oc" id="aR7-ww-NCi"/>
<outlet property="userFingerprintTitleLabel" destination="5De-Jq-XWv" id="68F-0n-IMn"/>
<outlet property="userImageView" destination="YOs-e5-ee3" id="zC3-Wp-ew3"/>
<segue destination="7qX-e8-QDY" kind="show" identifier="ScanIdentityBarcodeViewSegue" id="aSp-qz-VlO"/>
<segue destination="in8-UP-6ff" kind="show" identifier="PresentIdentityQRCodeViewSegue" id="mQB-3L-0HK"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="sd1-mY-rAe" userLabel="First Responder" sceneMemberID="firstResponder"/>
@ -4635,7 +4758,7 @@ A0 09 9A FF A8 8A 09 99</string>
</mask>
</variation>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XPv-Ww-lSM">
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XPv-Ww-lSM">
<rect key="frame" x="-23" y="-15" width="46" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="6VH-TG-7PM"/>
@ -5255,8 +5378,7 @@ A0 09 9A FF A8 8A 09 99</string>
<exclude reference="x58-IA-RdP"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact" misplaced="YES">
<rect key="frame" x="19" y="4" width="300" height="35.5"/>
<variation key="heightClass=regular-widthClass=compact">
<mask key="constraints">
<include reference="x58-IA-RdP"/>
</mask>
@ -5412,7 +5534,7 @@ A0 09 9A FF A8 8A 09 99</string>
<viewControllerLayoutGuide type="bottom" id="kH6-9L-pzh"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="P0X-AM-Yjw">
<rect key="frame" x="0.0" y="0.0" width="600" height="536"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ukg-om-VX3">
@ -5520,9 +5642,6 @@ A0 09 9A FF A8 8A 09 99</string>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
<variation key="heightClass=regular-widthClass=compact" misplaced="YES">
<rect key="frame" x="10" y="274" width="94" height="20.5"/>
</variation>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@ -5670,9 +5789,12 @@ A0 09 9A FF A8 8A 09 99</string>
<image name="add-conversation" width="26" height="26"/>
<image name="archive-active@1x" width="40" height="51"/>
<image name="archive-inactive@1x" width="40" height="51"/>
<image name="btnCamera--white" width="52" height="40"/>
<image name="btnCancel--white" width="20" height="20"/>
<image name="btnGroup--white" width="29" height="26"/>
<image name="btnPhone--blue" width="45" height="44"/>
<image name="btnQRShow--white" width="66" height="66"/>
<image name="btnQRShow--white-1" width="66" height="66"/>
<image name="btnSignalLogo--white" width="32" height="32"/>
<image name="call.png" width="100" height="100"/>
<image name="call_dark.png" width="50" height="50"/>
@ -5684,8 +5806,6 @@ A0 09 9A FF A8 8A 09 99</string>
<image name="inbox-inactive@1x" width="40" height="51"/>
<image name="mute-active" width="80" height="80"/>
<image name="mute-inactive" width="80" height="80"/>
<image name="qr.png" width="100" height="100"/>
<image name="qr_scan_fingerprint.png" width="100" height="100"/>
<image name="quit.png" width="50" height="50"/>
<image name="settings-icon@1x" width="25" height="24"/>
<image name="settings_tab.png" width="24" height="24"/>
@ -5697,8 +5817,8 @@ A0 09 9A FF A8 8A 09 99</string>
<image name="uiEmptyArchive" width="227" height="227"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="ZcV-Ck-baL"/>
<segue reference="DR8-fx-0PD"/>
<segue reference="xo7-5J-BJb"/>
<segue reference="D0d-4f-lcI"/>
<segue reference="gZ1-lh-srF"/>
</inferredMetricsTieBreakers>
</document>

View File

@ -12,6 +12,8 @@
+ (UIColor*) ows_materialBlueColor;
+ (UIColor *) ows_fadedBlueColor;
+ (UIColor *) ows_darkBackgroundColor;

View File

@ -31,17 +31,18 @@
}
+ (UIColor *) ows_fadedBlueColor {
return [UIColor colorWithRed:110.f/255.f green:178.f/255.f blue:1.f alpha:1.f];
// blue: #B6DEF4
return [UIColor colorWithRed:182.f/255.f green:222.f/255.f blue:244.f/255.f alpha:1.f];
}
+ (UIColor *) ows_yellowColor {
// gold: #FFBB5C
return [UIColor colorWithRed:255./255.f green:87.f/255.f blue:92.f/255.f alpha:1.f];
return [UIColor colorWithRed:245.f/255.f green:186.f/255.f blue:98.f/255.f alpha:1.f];
}
+ (UIColor *) ows_greenColor {
// green: #92FF8A
return [UIColor colorWithRed:92.f/255.f green:255.f/255.f blue:138.f/255.f alpha:1.f];
return [UIColor colorWithRed:146.f/255.f green:255.f/255.f blue:138.f/255.f alpha:1.f];
}
+ (UIColor *) ows_redColor {

View File

@ -25,8 +25,12 @@
@interface FingerprintViewController ()
@property TSContactThread *thread;
@property (nonatomic) BOOL isPresentingDialog;
@end
static NSString* const kPresentIdentityQRCodeViewSegue = @"PresentIdentityQRCodeViewSegue";
static NSString* const kScanIdentityBarcodeViewSegue = @"ScanIdentityBarcodeViewSegue";
@implementation FingerprintViewController
- (void)configWithThread:(TSThread *)thread{
@ -37,7 +41,18 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setAlpha:0];
UITapGestureRecognizer *tapToShowFingerprint = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showFingerprint)];
tapToShowFingerprint.numberOfTapsRequired = 1;
UITapGestureRecognizer *tapToScanFingerprint = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(scanFingerprint)];
tapToScanFingerprint.numberOfTapsRequired = 1;
UILongPressGestureRecognizer *longpressToResetSession = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(shredAndDelete:)];
longpressToResetSession.minimumPressDuration = 1.0;
[self.view addGestureRecognizer:longpressToResetSession];
[self.view addGestureRecognizer:tapToShowFingerprint];
[_theirFingerprintView addGestureRecognizer:tapToScanFingerprint];
}
- (void)viewWillAppear:(BOOL)animated
@ -51,6 +66,7 @@
[UIView animateWithDuration:0.6 delay:0. options:UIViewAnimationOptionCurveEaseInOut animations:^{
[self.view setAlpha:1];
} completion:nil];
}
- (void)didReceiveMemoryWarning {
@ -94,34 +110,45 @@
- (IBAction)shredAndDelete:(id)sender
{
[DJWActionSheet showInView:self.view withTitle:@"Are you sure wou want to shred the following? This action is irreversible."
cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@[@"Shred all keying material", @"Also shred communications"]
tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) {
if (tappedButtonIndex == actionSheet.cancelButtonIndex) {
NSLog(@"User Cancelled");
} else if (tappedButtonIndex == actionSheet.destructiveButtonIndex) {
NSLog(@"Destructive button tapped");
}else {
switch (tappedButtonIndex) {
case 0:
[self shredKeyingMaterial];
break;
case 1:
[self shredKeyingMaterial];
[self shredDiscussionsWithContact];
break;
default:
break;
if(!_isPresentingDialog) {
_isPresentingDialog = YES;
[DJWActionSheet showInView:self.view withTitle:@"Are you sure wou want to shred the following? This action is irreversible."
cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@[@"Shred all keying material"]
tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) {
_isPresentingDialog = NO;
if (tappedButtonIndex == actionSheet.cancelButtonIndex) {
NSLog(@"User Cancelled");
} else if (tappedButtonIndex == actionSheet.destructiveButtonIndex) {
NSLog(@"Destructive button tapped");
}else {
switch (tappedButtonIndex) {
case 0:
[self shredKeyingMaterial];
break;
default:
break;
}
}
}
}];
}];
}
}
-(void) showFingerprint {
[self performSegueWithIdentifier:kPresentIdentityQRCodeViewSegue sender:self];
}
-(void) scanFingerprint {
[self performSegueWithIdentifier:kScanIdentityBarcodeViewSegue sender:self];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if([[segue identifier] isEqualToString:@"PresentIdentityQRCodeViewSegue"]){
if([[segue identifier] isEqualToString:kPresentIdentityQRCodeViewSegue]){
[segue.destinationViewController setIdentityKey:[[self getMyPublicIdentityKey] prependKeyType]];
}
else if([[segue identifier] isEqualToString:@"ScanIdentityBarcodeViewSegue"]){
else if([[segue identifier] isEqualToString:kScanIdentityBarcodeViewSegue]){
[segue.destinationViewController setIdentityKey:[[self getTheirPublicIdentityKey] prependKeyType]];
}

View File

@ -34,9 +34,7 @@ typedef enum : NSUInteger {
@property (nonatomic, strong) IBOutlet NextResponderScrollView *scrollView;
@property (nonatomic, strong) IBOutlet UIView *contentContainerView;
@property (nonatomic, strong) IBOutlet UIView *deleteView;
@property (nonatomic, strong) IBOutlet UIView *archiveView;
@property (nonatomic, strong) IBOutlet UIImageView *deleteImageView;
@property (nonatomic, strong) IBOutlet UIImageView *archiveImageView;
@property (nonatomic, assign) id<TableViewCellDelegate> delegate;

View File

@ -30,7 +30,6 @@
CGRectGetHeight(_scrollView.frame));
_scrollView.contentOffset = CGPointMake(CGRectGetWidth(_archiveView.frame), 0);
_deleteImageView.image = [_deleteImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
_archiveImageView.image = [_archiveImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
_lastActionImageView.image = [_lastActionImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

View File

@ -14,19 +14,6 @@
<rect key="frame" x="0.0" y="0.0" width="318" height="71"/>
<autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3rD-4i-EKG" userLabel="Delete View">
<rect key="frame" x="299" y="0.0" width="102" height="72"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="btnDelete--white" translatesAutoresizingMaskIntoConstraints="NO" id="TBw-ud-Ysk">
<rect key="frame" x="50" y="23" width="19" height="25"/>
<color key="backgroundColor" red="0.97896391153335571" green="0.3013535737991333" blue="0.023711061105132103" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.94901960780000005" green="0.21186716179592704" blue="0.099555311452974679" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="102" id="sEr-Wb-h8b"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yBY-TS-2tI" userLabel="Archive View">
<rect key="frame" x="-32" y="1" width="200" height="71"/>
<subviews>
@ -164,15 +151,11 @@
<constraint firstItem="bG5-iK-ql3" firstAttribute="trailing" secondItem="yBY-TS-2tI" secondAttribute="trailing" constant="400" id="Efu-Ej-DLZ"/>
<constraint firstItem="yBY-TS-2tI" firstAttribute="leading" secondItem="BRG-hJ-lRa" secondAttribute="leadingMargin" constant="-8" id="HBi-XD-XdK"/>
<constraint firstAttribute="centerY" secondItem="bG5-iK-ql3" secondAttribute="centerY" constant="-0.25" id="IQe-4d-baG"/>
<constraint firstAttribute="trailingMargin" secondItem="3rD-4i-EKG" secondAttribute="trailing" constant="23" id="LCr-QP-vla"/>
<constraint firstAttribute="centerY" secondItem="yBY-TS-2tI" secondAttribute="centerY" constant="-0.5" id="LFd-ft-Cx2"/>
<constraint firstAttribute="bottomMargin" secondItem="3rD-4i-EKG" secondAttribute="bottom" constant="-8.5" id="SPU-lp-rQv"/>
<constraint firstAttribute="trailingMargin" secondItem="3rD-4i-EKG" secondAttribute="trailing" constant="-9" id="SbS-PB-jL2"/>
<constraint firstItem="yBY-TS-2tI" firstAttribute="leading" secondItem="BRG-hJ-lRa" secondAttribute="leadingMargin" constant="-40" id="ZTu-mT-wNL"/>
<constraint firstItem="yBY-TS-2tI" firstAttribute="leading" secondItem="BRG-hJ-lRa" secondAttribute="leadingMargin" constant="-8" id="dJ9-E4-MkG"/>
<constraint firstAttribute="trailingMargin" secondItem="bG5-iK-ql3" secondAttribute="trailing" constant="-8" id="ikW-Es-Ngp"/>
<constraint firstItem="yBY-TS-2tI" firstAttribute="leading" secondItem="BRG-hJ-lRa" secondAttribute="leadingMargin" id="lMh-PN-kR2"/>
<constraint firstItem="3rD-4i-EKG" firstAttribute="top" secondItem="BRG-hJ-lRa" secondAttribute="topMargin" constant="-8" id="yxg-lB-7gK"/>
</constraints>
<variation key="default">
<mask key="constraints">
@ -182,7 +165,6 @@
<exclude reference="LFd-ft-Cx2"/>
<exclude reference="dJ9-E4-MkG"/>
<exclude reference="lMh-PN-kR2"/>
<exclude reference="LCr-QP-vla"/>
</mask>
</variation>
</tableViewCellContentView>
@ -191,8 +173,6 @@
<outlet property="archiveView" destination="yBY-TS-2tI" id="Olb-KX-yw5"/>
<outlet property="contactPictureView" destination="p9o-x6-nT5" id="oUA-O3-JIc"/>
<outlet property="contentContainerView" destination="kq8-RD-txC" id="yaJ-z3-8sC"/>
<outlet property="deleteImageView" destination="TBw-ud-Ysk" id="a1T-GR-0cx"/>
<outlet property="deleteView" destination="3rD-4i-EKG" id="oak-Hh-6CC"/>
<outlet property="nameLabel" destination="gWV-cB-qZe" id="drr-G2-EB6"/>
<outlet property="scrollView" destination="bG5-iK-ql3" id="wEp-AH-Pdu"/>
<outlet property="snippetLabel" destination="Qgj-EY-BWC" id="EIb-je-Cw5"/>
@ -201,7 +181,6 @@
</tableViewCell>
</objects>
<resources>
<image name="btnDelete--white" width="19" height="24"/>
<image name="cellBtnMoveToArchive--blue" width="30" height="30"/>
<image name="contact_default_feed.png" width="242" height="242"/>
</resources>

View File

@ -62,6 +62,9 @@
#define kYapDatabaseRangeLength 50
#define kYapDatabaseRangeMaxLength 300
#define kYapDatabaseRangeMinLength 20
#define JSQ_TOOLBAR_ICON_HEIGHT 22
#define JSQ_TOOLBAR_ICON_WIDTH 22
#define JSQ_IMAGE_INSET 5
static NSTimeInterval const kTSMessageSentDateShowTimeInterval = 5 * 60;
static NSString *const kUpdateGroupSegueIdentifier = @"updateGroupSegue";
@ -94,6 +97,9 @@ typedef enum : NSUInteger {
@property (nonatomic, retain) UIButton *attachButton;
@property (nonatomic, retain) NSIndexPath *lastDeliveredMessageIndexPath;
@property (nonatomic, retain) UIGestureRecognizer *showFingerprintDisplay;
@property (nonatomic, retain) UITapGestureRecognizer *toggleContactPhoneDisplay;
@property (nonatomic) BOOL displayPhoneAsTitle;
@property NSUInteger page;
@ -143,19 +149,30 @@ typedef enum : NSUInteger {
- (void)viewDidLoad {
[super viewDidLoad];
[self.navigationController.navigationBar setTranslucent:NO];
_showFingerprintDisplay = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(showFingerprint)];
_toggleContactPhoneDisplay = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toggleContactPhone)];
_toggleContactPhoneDisplay.numberOfTapsRequired = 1;
_callButton = [[UIButton alloc] init];
[_callButton setBackgroundImage:[UIImage imageNamed:@"btnPhone--blue"] forState:UIControlStateNormal];
[_callButton addTarget:self action:@selector(callAction) forControlEvents:UIControlEventTouchUpInside];
[_callButton setFrame:CGRectMake(0, 0, 30, 30)];
[_callButton setFrame:CGRectMake(0, 0, JSQ_TOOLBAR_ICON_WIDTH+JSQ_IMAGE_INSET*2, JSQ_TOOLBAR_ICON_HEIGHT+JSQ_IMAGE_INSET*2)];
_callButton.imageEdgeInsets = UIEdgeInsetsMake(JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET);
[_callButton setImage:[UIImage imageNamed:@"btnPhone--blue"] forState:UIControlStateNormal];
_messageButton = [[UIButton alloc] init];
[_messageButton setBackgroundImage:[UIImage imageNamed:@"btnSend--blue"] forState:UIControlStateNormal];
[_messageButton setFrame:CGRectMake(0, 0, 30, 30)];
[_messageButton setFrame:CGRectMake(0, 0, JSQ_TOOLBAR_ICON_WIDTH+JSQ_IMAGE_INSET*2, JSQ_TOOLBAR_ICON_HEIGHT+JSQ_IMAGE_INSET*2)];
_messageButton.imageEdgeInsets = UIEdgeInsetsMake(JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET);
[_messageButton setImage:[UIImage imageNamed:@"btnSend--blue"] forState:UIControlStateNormal];
_attachButton = [[UIButton alloc] init];
[_attachButton setBackgroundImage:[UIImage imageNamed:@"btnAttachments--blue"] forState:UIControlStateNormal];
[_attachButton setFrame:CGRectMake(0, 0, 30, 30)];
[_attachButton setFrame:CGRectMake(0, 0, JSQ_TOOLBAR_ICON_WIDTH+JSQ_IMAGE_INSET*2, JSQ_TOOLBAR_ICON_HEIGHT+JSQ_IMAGE_INSET*2)];
_attachButton.imageEdgeInsets = UIEdgeInsetsMake(JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET);
[_attachButton setImage:[UIImage imageNamed:@"btnAttachments--blue"] forState:UIControlStateNormal];
[super viewDidLoad];
@ -190,7 +207,7 @@ typedef enum : NSUInteger {
[self.inputToolbar.contentView.textView setFont:[UIFont ows_regularFontWithSize:17.f]];
self.inputToolbar.contentView.leftBarButtonItem = _attachButton;
if(!isGroupConversation&& [self isRedPhoneReachable] && ![((TSContactThread*)_thread).contactIdentifier isEqualToString:[SignalKeyingStorage.localNumber toE164]]) {
if([self canCall]) {
self.inputToolbar.contentView.rightBarButtonItem = _callButton;
self.inputToolbar.contentView.rightBarButtonItem.enabled = YES;
}
@ -252,6 +269,11 @@ typedef enum : NSUInteger {
}
[self cancelReadTimer];
[[self.navController.navigationBar.subviews objectAtIndex:0] removeGestureRecognizer:_showFingerprintDisplay];
[[self.navController.navigationBar.subviews objectAtIndex:0] removeGestureRecognizer:_toggleContactPhoneDisplay];
[[self.navController.navigationBar.subviews objectAtIndex:0] setUserInteractionEnabled:NO];
}
- (void)didReceiveMemoryWarning {
@ -307,13 +329,21 @@ typedef enum : NSUInteger {
}
-(void)initializeToolbars {
self.navController = (APNavigationController*)self.navigationController;
if(!isGroupConversation) {
self.navigationItem.rightBarButtonItem = nil;
[[ self.navController.navigationBar.subviews objectAtIndex:0] setUserInteractionEnabled:YES];
[[ self.navController.navigationBar.subviews objectAtIndex:0] addGestureRecognizer:_showFingerprintDisplay];
[[ self.navController.navigationBar.subviews objectAtIndex:0] addGestureRecognizer:_toggleContactPhoneDisplay];
}
[self setNavigationTitle];
[self hideInputIfNeeded];
}
@ -350,6 +380,16 @@ typedef enum : NSUInteger {
}
-(void) toggleContactPhone {
_displayPhoneAsTitle = !_displayPhoneAsTitle;
if(_displayPhoneAsTitle) {
self.title = [PhoneNumber bestEffortFormatPartialUserSpecifiedTextToLookLikeAPhoneNumber:[[self phoneNumberForThread] toE164]];
}
else {
[self setNavigationTitle];
}
}
-(void)showGroupMembers {
[self.navController hideDropDown:self];
[self performSegueWithIdentifier:kShowGroupMembersSegue sender:self];
@ -395,12 +435,16 @@ typedef enum : NSUInteger {
}
}
-(BOOL) canCall {
return !isGroupConversation && [self isRedPhoneReachable] && ![((TSContactThread*)_thread).contactIdentifier isEqualToString:[SignalKeyingStorage.localNumber toE164]];
}
- (void)textViewDidChange:(UITextView *)textView {
if([textView.text length]>0) {
self.inputToolbar.contentView.rightBarButtonItem = _messageButton;
self.inputToolbar.contentView.rightBarButtonItem.enabled = YES;
}
else if(!isGroupConversation) {
else if([self canCall]) {
self.inputToolbar.contentView.rightBarButtonItem = _callButton;
self.inputToolbar.contentView.rightBarButtonItem.enabled = YES;
}
@ -425,7 +469,7 @@ typedef enum : NSUInteger {
[[TSMessagesManager sharedManager] sendMessage:message inThread:self.thread];
[self finishSendingMessage];
}
if(!isGroupConversation) {
if([self canCall]) {
self.inputToolbar.contentView.rightBarButtonItem = _callButton;
self.inputToolbar.contentView.rightBarButtonItem.enabled = YES;
}

View File

@ -129,7 +129,9 @@
} else if ([interaction isKindOfClass:[TSCall class]]){
adapter.messageBody = @"Placeholder for TSCalls";
adapter.messageType = TSCallAdapter;
return [self jsqCallForTSCall:(TSCall*)interaction thread:(TSContactThread*)thread];
JSQCall *call = [self jsqCallForTSCall:(TSCall*)interaction thread:(TSContactThread*)thread];
call.useThumbnail = YES;
return call;
} else if ([interaction isKindOfClass:[TSInfoMessage class]]){
TSInfoMessage * infoMessage = (TSInfoMessage*)interaction;
adapter.infoMessageType = infoMessage.messageType;
@ -138,7 +140,14 @@
if(adapter.infoMessageType == TSInfoMessageTypeGroupQuit || adapter.infoMessageType == TSInfoMessageTypeGroupUpdate) {
// repurposing call display for info message stuff for group updates, ! adapter will know because the date is nil
CallStatus status = 0;
if(adapter.infoMessageType==TSInfoMessageTypeGroupQuit) {
status = kGroupUpdateLeft;
}
else if(adapter.infoMessageType == TSInfoMessageTypeGroupUpdate) {
status = kGroupUpdate;
}
JSQCall* call = [[JSQCall alloc] initWithCallerId:@"" callerDisplayName:adapter.messageBody date:nil status:status];
call.useThumbnail = YES;
return call;
}
} else {

View File

@ -22,6 +22,7 @@
@property (nonatomic, retain) IBOutlet UIButton *archiveButton;
@property (nonatomic, retain) IBOutlet UILabel *inboxCountLabel;
@property (nonatomic, strong) IBOutlet UIImageView *emptyBoxImage;
@property (nonatomic, strong) IBOutlet UILabel *emptyBoxLabel;
@property (nonatomic, retain) CallState* latestCall;

View File

@ -20,6 +20,7 @@
#import "TSSocketManager.h"
#import "TSContactThread.h"
#import "TSMessagesManager+sendMessages.h"
#import "UIImage+normalizeImage.h"
#import "NSDate+millisecondTimeStamp.h"
@ -149,15 +150,25 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
return;
}
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath
{
// add the ability to delete the cell
UITableViewRowAction *deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"X " handler:^(UITableViewRowAction *action, NSIndexPath *swipedIndexPath){
UITableViewRowAction *deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@" " handler:^(UITableViewRowAction *action, NSIndexPath *swipedIndexPath){
[self tableViewCellTappedDelete:swipedIndexPath];
}];
deleteAction.backgroundColor = [UIColor ows_redColor];
UIImage* buttonImage = [[UIImage imageNamed:@"cellBtnDelete"] resizedImageToSize:CGSizeMake(82.0f, 72.0f)];
deleteAction.backgroundColor = [[UIColor alloc] initWithPatternImage:buttonImage];
//deleteAction.backgroundColor = [UIColor ows_redColor];
return @[deleteAction];
return nil;
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
@ -369,13 +380,47 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
[_tableView setHidden:NO];
if (self.viewingThreadsIn == kInboxState && [self.threadMappings numberOfItemsInGroup:TSInboxGroup]==0) {
_emptyBoxImage.image = [UIImage imageNamed:@"uiEmptyContact"];
[self setEmptyBoxText];
[_tableView setHidden:YES];
}
else if (self.viewingThreadsIn == kArchiveState && [self.threadMappings numberOfItemsInGroup:TSArchiveGroup]==0) {
else if (self.viewingThreadsIn == kArchiveState && [self.threadMappings numberOfItemsInGroup:TSArchiveGroup]==0) {
_emptyBoxImage.image = [UIImage imageNamed:@"uiEmptyArchive"];
[self setEmptyBoxText];
[_tableView setHidden:YES];
}
}
-(void) setEmptyBoxText {
_emptyBoxLabel.textColor = [UIColor grayColor];
_emptyBoxLabel.font = [UIFont ows_regularFontWithSize:18.f];
_emptyBoxLabel.textAlignment = NSTextAlignmentCenter;
_emptyBoxLabel.numberOfLines = 4;
NSString* firstLine = @"";
NSString* secondLine = @"";
if(self.viewingThreadsIn == kInboxState) {
// Check if this is the first launch
firstLine = @"No Messages :(";
secondLine = @"Tap compose to send a message or invite a friend to Signal.";
}
else {
firstLine = @"No archived messages.";
secondLine = @"Swipe right on any message in your inbox and archive it here.";
}
NSMutableAttributedString *fullLabelString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@",firstLine,secondLine]];
[fullLabelString addAttribute:NSFontAttributeName value:[UIFont ows_boldFontWithSize:15.f] range:NSMakeRange(0,firstLine.length)];
[fullLabelString addAttribute:NSFontAttributeName value:[UIFont ows_regularFontWithSize:14.f] range:NSMakeRange(firstLine.length + 1, secondLine.length)];
[fullLabelString addAttribute:NSForegroundColorAttributeName value:[UIColor blackColor] range:NSMakeRange(0,firstLine.length)];
[fullLabelString addAttribute:NSForegroundColorAttributeName value:[UIColor ows_darkGrayColor] range:NSMakeRange(firstLine.length + 1, secondLine.length)];
_emptyBoxLabel.attributedText = fullLabelString;
}
@end