Add muting of threads.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-04-17 15:13:15 -04:00
parent ea848f31e6
commit c8466912f0
12 changed files with 641 additions and 483 deletions

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_mute_thread@1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_mute_thread@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_mute_thread@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1217" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="tuk-0x-yCb">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="tuk-0x-yCb">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
@ -369,298 +369,7 @@
<!--Conversation Settings-->
<scene sceneID="Flt-X5-Amc">
<objects>
<tableViewController storyboardIdentifier="OWSConversationSettingsTableViewController" title="Contact Information" id="4oU-Rv-yJi" userLabel="Conversation Settings" customClass="OWSConversationSettingsTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" sectionIndexMinimumDisplayRowCount="1" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="Dgp-fo-Lyr">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="ISI-k9-YYb" userLabel="Header">
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FtL-Hb-6Dz" userLabel="Contact Info">
<rect key="frame" x="16" y="16" width="343" height="68"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="empty-group-avatar" translatesAutoresizingMaskIntoConstraints="NO" id="7IV-AJ-aCS">
<rect key="frame" x="0.0" y="0.0" width="68" height="68"/>
<constraints>
<constraint firstAttribute="width" secondItem="7IV-AJ-aCS" secondAttribute="height" multiplier="1:1" id="XYc-uT-wt9"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Edward Snowden" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qCt-Cp-bFX" userLabel="Name">
<rect key="frame" x="84" y="15" width="259" height="27"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+1 323-555-1234" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tmV-r0-09O" userLabel="Signal ID">
<rect key="frame" x="84" y="42" width="259" height="18"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="7IV-AJ-aCS" firstAttribute="leading" secondItem="FtL-Hb-6Dz" secondAttribute="leading" id="5OG-5g-m6A"/>
<constraint firstItem="qCt-Cp-bFX" firstAttribute="centerY" secondItem="FtL-Hb-6Dz" secondAttribute="centerY" constant="-6" id="APJ-G5-AZh"/>
<constraint firstItem="tmV-r0-09O" firstAttribute="top" secondItem="qCt-Cp-bFX" secondAttribute="bottom" id="AyS-jZ-8Qn"/>
<constraint firstAttribute="bottom" secondItem="7IV-AJ-aCS" secondAttribute="bottom" id="QG8-cj-nKK"/>
<constraint firstItem="tmV-r0-09O" firstAttribute="leading" secondItem="7IV-AJ-aCS" secondAttribute="trailing" constant="16" id="XyN-cc-EeU"/>
<constraint firstItem="qCt-Cp-bFX" firstAttribute="leading" secondItem="7IV-AJ-aCS" secondAttribute="trailing" constant="16" id="hcC-NE-JzL"/>
<constraint firstAttribute="trailing" secondItem="qCt-Cp-bFX" secondAttribute="trailing" id="s0D-Ur-rWN"/>
<constraint firstAttribute="trailing" secondItem="tmV-r0-09O" secondAttribute="trailing" id="seF-vN-zav"/>
<constraint firstItem="7IV-AJ-aCS" firstAttribute="top" secondItem="FtL-Hb-6Dz" secondAttribute="top" id="w1Y-ji-wWV"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="FtL-Hb-6Dz" secondAttribute="bottom" constant="16" id="5hM-1e-CCT"/>
<constraint firstAttribute="trailing" secondItem="FtL-Hb-6Dz" secondAttribute="trailing" constant="16" id="DS6-6y-KUe"/>
<constraint firstItem="FtL-Hb-6Dz" firstAttribute="top" secondItem="ISI-k9-YYb" secondAttribute="top" constant="16" id="F8S-4d-c1C"/>
<constraint firstItem="FtL-Hb-6Dz" firstAttribute="leading" secondItem="ISI-k9-YYb" secondAttribute="leading" constant="16" id="iaB-xd-LVB"/>
</constraints>
</view>
<sections>
<tableViewSection id="Wb6-Ta-5b7">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Iq5-ca-zUp" imageView="eGH-Vc-aKx" style="IBUITableViewCellStyleDefault" id="Dzg-XO-ciX">
<rect key="frame" x="0.0" y="100" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Dzg-XO-ciX" id="KFb-kN-MV9">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Verify Safety Numbers" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Iq5-ca-zUp">
<rect key="frame" x="62" y="0.0" width="278" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="ic_lock_outline" id="eGH-Vc-aKx">
<rect key="frame" x="15" y="5" width="32" height="32"/>
<autoresizingMask key="autoresizingMask"/>
<color key="tintColor" red="0.054901960784313725" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="calibratedRGB"/>
</imageView>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="urv-62-RsD" kind="modal" identifier="OWSConversationSettingsTableViewControllerSegueSafetyNumbers" id="wgA-Oo-kKq"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="checkmark" indentationWidth="10" textLabel="NTW-lE-H66" imageView="cpX-fS-xEX" style="IBUITableViewCellStyleDefault" id="Lpy-OD-yA9">
<rect key="frame" x="0.0" y="144" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lpy-OD-yA9" id="NhR-r7-vVa">
<rect key="frame" x="0.0" y="0.0" width="336" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Block List State" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NTW-lE-H66" userLabel="Block List State">
<rect key="frame" x="62" y="0.0" width="274" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="ic_lock_outline" id="cpX-fS-xEX">
<rect key="frame" x="15" y="5" width="32" height="32"/>
<autoresizingMask key="autoresizingMask"/>
<color key="tintColor" red="0.054901960780000002" green="0.054901960780000002" blue="0.054901960780000002" alpha="1" colorSpace="calibratedRGB"/>
</imageView>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="108" id="U6h-Xo-HEv">
<rect key="frame" x="0.0" y="188" width="375" height="108"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="U6h-Xo-HEv" id="Nmz-2u-fOY">
<rect key="frame" x="0.0" y="0.0" width="375" height="107"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Disappearing Messages" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="qbY-qJ-enK" userLabel="Disappearing Messages">
<rect key="frame" x="64" y="0.0" width="238" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="dT5-gx-pqJ"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0dO-mx-W3I" userLabel="Disappearing Messages Switch">
<rect key="frame" x="310" y="7" width="51" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="49" id="6x6-MQ-bdQ"/>
</constraints>
<connections>
<action selector="disappearingMessagesSwitchValueDidChange:" destination="4oU-Rv-yJi" eventType="valueChanged" id="3fF-JA-69e"/>
</connections>
</switch>
<imageView opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="table_ic_timer" translatesAutoresizingMaskIntoConstraints="NO" id="iRL-ZI-kXA">
<rect key="frame" x="16" y="6" width="32" height="32"/>
<color key="tintColor" red="0.054901960780000002" green="0.054901960780000002" blue="0.054901960780000002" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="iRL-ZI-kXA" secondAttribute="height" multiplier="1:1" id="QMF-qg-bIc"/>
<constraint firstAttribute="width" constant="32" id="sNs-JX-hXg"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="When enabled, messages sent and received in this conversation will disappear after they have been seen." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="zIg-K4-8lV">
<rect key="frame" x="64" y="40" width="287" height="59"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="iRL-ZI-kXA" firstAttribute="leading" secondItem="Nmz-2u-fOY" secondAttribute="leading" constant="16" id="FsM-rL-dWt"/>
<constraint firstItem="qbY-qJ-enK" firstAttribute="top" secondItem="Nmz-2u-fOY" secondAttribute="top" id="Hzt-Rw-yQA"/>
<constraint firstItem="zIg-K4-8lV" firstAttribute="top" secondItem="qbY-qJ-enK" secondAttribute="bottom" constant="-4" id="NGz-Yy-9uN"/>
<constraint firstItem="zIg-K4-8lV" firstAttribute="leading" secondItem="qbY-qJ-enK" secondAttribute="leading" id="PYG-46-cLa"/>
<constraint firstAttribute="trailing" secondItem="0dO-mx-W3I" secondAttribute="trailing" constant="16" id="Sps-hn-rSK"/>
<constraint firstItem="qbY-qJ-enK" firstAttribute="leading" secondItem="iRL-ZI-kXA" secondAttribute="trailing" constant="16" id="VTt-Tu-IZX"/>
<constraint firstItem="zIg-K4-8lV" firstAttribute="bottom" secondItem="Nmz-2u-fOY" secondAttribute="bottomMargin" id="bmW-xQ-Aew"/>
<constraint firstItem="iRL-ZI-kXA" firstAttribute="centerY" secondItem="qbY-qJ-enK" secondAttribute="centerY" id="tUO-Jh-e96"/>
<constraint firstItem="0dO-mx-W3I" firstAttribute="centerY" secondItem="qbY-qJ-enK" secondAttribute="centerY" id="tWU-r2-4Yw"/>
<constraint firstItem="0dO-mx-W3I" firstAttribute="leading" secondItem="qbY-qJ-enK" secondAttribute="trailing" constant="8" id="vBn-ow-kYP"/>
<constraint firstAttribute="trailingMargin" secondItem="zIg-K4-8lV" secondAttribute="trailing" constant="16" id="wX5-0Y-U78"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="63" minY="0.0" maxX="0.0" maxY="0.0"/>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="76" id="3dL-aW-P1A">
<rect key="frame" x="0.0" y="296" width="375" height="76"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3dL-aW-P1A" id="2a2-Po-p8O">
<rect key="frame" x="0.0" y="0.0" width="375" height="75"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Messages disappear after 8 hours." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="c6Q-rV-1LO" userLabel="Keep messages for 8 hours.">
<rect key="frame" x="64" y="6" width="303" height="32"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="4Hn-9p-qsR">
<rect key="frame" x="62" y="38" width="295" height="31"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="D1q-zH-wtT"/>
</constraints>
<connections>
<action selector="durationSliderDidChange:" destination="4oU-Rv-yJi" eventType="valueChanged" id="bCT-Zk-qlf"/>
</connections>
</slider>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="table_ic_hourglass_empty" translatesAutoresizingMaskIntoConstraints="NO" id="X7n-1t-1Q7">
<rect key="frame" x="16" y="6" width="32" height="32"/>
<color key="tintColor" red="0.054901960784313725" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="Pmb-2B-dEA"/>
<constraint firstAttribute="width" secondItem="X7n-1t-1Q7" secondAttribute="height" multiplier="1:1" id="n74-jg-DRI"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="4Hn-9p-qsR" secondAttribute="trailingMargin" constant="20" id="1ax-MF-sw0"/>
<constraint firstItem="X7n-1t-1Q7" firstAttribute="top" secondItem="2a2-Po-p8O" secondAttribute="top" constant="6" id="4HY-RT-xoS"/>
<constraint firstItem="c6Q-rV-1LO" firstAttribute="leading" secondItem="4Hn-9p-qsR" secondAttribute="leading" id="QCT-ex-ksv"/>
<constraint firstAttribute="trailing" secondItem="c6Q-rV-1LO" secondAttribute="trailing" constant="8" id="S0m-8d-0vR"/>
<constraint firstItem="c6Q-rV-1LO" firstAttribute="bottom" secondItem="X7n-1t-1Q7" secondAttribute="bottom" id="WOE-pQ-2zh"/>
<constraint firstItem="c6Q-rV-1LO" firstAttribute="leading" secondItem="X7n-1t-1Q7" secondAttribute="trailing" constant="16" id="itv-VA-m3d"/>
<constraint firstItem="c6Q-rV-1LO" firstAttribute="top" secondItem="X7n-1t-1Q7" secondAttribute="top" id="oa2-QP-Lhu"/>
<constraint firstItem="X7n-1t-1Q7" firstAttribute="leading" secondItem="2a2-Po-p8O" secondAttribute="leading" constant="16" id="qNh-GB-pE2"/>
<constraint firstItem="4Hn-9p-qsR" firstAttribute="top" secondItem="c6Q-rV-1LO" secondAttribute="bottom" id="ssH-ql-B0K"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="63" minY="0.0" maxX="0.0" maxY="0.0"/>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Group Management" id="z5m-Fe-GK8">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="NxZ-wa-xV9" style="IBUITableViewCellStyleDefault" id="XHr-b6-Gvn" userLabel="Update Group">
<rect key="frame" x="0.0" y="429" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XHr-b6-Gvn" id="Epj-vT-UYL">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Update Group" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NxZ-wa-xV9">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="bDi-2Q-XOC" kind="push" identifier="OWSConversationSettingsTableViewControllerSegueUpdateGroup" id="E8S-Yc-X7E"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="geN-YN-TQg" style="IBUITableViewCellStyleDefault" id="w57-rz-BWN" userLabel="Leave Group">
<rect key="frame" x="0.0" y="473" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="w57-rz-BWN" id="Pgy-Fc-U25">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Leave Group" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="geN-YN-TQg">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Zml-Zn-2fd" style="IBUITableViewCellStyleDefault" id="Dnq-Ko-46l" userLabel="Group Members">
<rect key="frame" x="0.0" y="517" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Dnq-Ko-46l" id="VRQ-31-E5Y">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Group Members" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Zml-Zn-2fd">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="JeZ-9g-U61" kind="push" identifier="OWSConversationSettingsTableViewControllerSegueShowGroupMembers" id="uLh-RA-Vq1"/>
</connections>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="4oU-Rv-yJi" id="88i-Ba-dhL"/>
<outlet property="delegate" destination="4oU-Rv-yJi" id="2U7-1z-zIl"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Conversation Settings" id="3Gh-BY-xJE"/>
<connections>
<outlet property="avatar" destination="7IV-AJ-aCS" id="9LA-fh-tIF"/>
<outlet property="blocklistStateCell" destination="Lpy-OD-yA9" id="GZW-j4-F2n"/>
<outlet property="disappearingMessagesDurationCell" destination="3dL-aW-P1A" id="fZT-hN-ZNB"/>
<outlet property="disappearingMessagesDurationLabel" destination="c6Q-rV-1LO" id="dEt-U7-kFm"/>
<outlet property="disappearingMessagesDurationSlider" destination="4Hn-9p-qsR" id="nMT-B6-hzM"/>
<outlet property="disappearingMessagesSwitch" destination="0dO-mx-W3I" id="bBm-Lk-kgv"/>
<outlet property="nameLabel" destination="qCt-Cp-bFX" id="7yI-kh-cN6"/>
<outlet property="signalIdLabel" destination="tmV-r0-09O" id="jFP-hM-j3f"/>
<outlet property="toggleDisappearingMessagesCell" destination="U6h-Xo-HEv" id="a3T-jn-u7Z"/>
<outlet property="toggleDisappearingMessagesDescriptionLabel" destination="zIg-K4-8lV" id="bbK-a4-b6t"/>
<outlet property="toggleDisappearingMessagesTitleLabel" destination="qbY-qJ-enK" id="gMK-F9-7Ss"/>
<outlet property="verifyPrivacyCell" destination="Dzg-XO-ciX" id="kKQ-3F-uIp"/>
<outletCollection property="cellIcons" destination="eGH-Vc-aKx" id="QW6-1W-hpg"/>
<outletCollection property="cellIcons" destination="iRL-ZI-kXA" id="kct-Ug-2zB"/>
<outletCollection property="cellIcons" destination="X7n-1t-1Q7" id="sc6-6u-NOR"/>
<outletCollection property="cellIcons" destination="cpX-fS-xEX" id="BZI-wV-O2B"/>
</connections>
</tableViewController>
<tableViewController storyboardIdentifier="OWSConversationSettingsTableViewController" title="Contact Information" id="4oU-Rv-yJi" userLabel="Conversation Settings" customClass="OWSConversationSettingsTableViewController" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ftx-dN-loa" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1448" y="-1570"/>
@ -678,7 +387,7 @@
<rect key="frame" x="0.0" y="22" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hyn-Ss-OAa" id="4XE-JO-Upr">
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
@ -699,7 +408,7 @@
<objects>
<navigationController storyboardIdentifier="UserInitialViewController" automaticallyAdjustsScrollViewInsets="NO" useStoryboardIdentifierAsRestorationIdentifier="YES" id="tuk-0x-yCb" customClass="SignalsNavigationController" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="VNq-cN-pk9">
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="VNq-cN-pk9">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="barTintColor" red="0.082137122750282288" green="0.46843802928924561" blue="0.91112053394317627" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -723,10 +432,10 @@
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ExistingDevice" rowHeight="72" id="XjV-oU-jSb" customClass="OWSDeviceTableViewCell">
<rect key="frame" x="0.0" y="56" width="375" height="72"/>
<rect key="frame" x="0.0" y="55.5" width="375" height="72"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XjV-oU-jSb" id="XqL-QG-IbY">
<rect key="frame" x="0.0" y="0.0" width="375" height="71"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="71.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Signal on Chrome" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="57o-uV-YOg">
@ -767,21 +476,21 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="AddNewDevice" textLabel="w80-IJ-E6R" detailTextLabel="8ft-2u-wBF" style="IBUITableViewCellStyleSubtitle" id="6h2-gg-1C6">
<rect key="frame" x="0.0" y="128" width="375" height="44"/>
<rect key="frame" x="0.0" y="127.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6h2-gg-1C6" id="RKi-c6-pzb">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Link New Device" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="w80-IJ-E6R">
<rect key="frame" x="15" y="3" width="127" height="21"/>
<rect key="frame" x="15" y="4" width="127" height="20.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Scan QR Code" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="8ft-2u-wBF">
<rect key="frame" x="15" y="24" width="88" height="16"/>
<rect key="frame" x="15" y="24.5" width="88" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -836,7 +545,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="96"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5zF-Ko-9qU" id="gr7-Sm-bcs">
<rect key="frame" x="0.0" y="0.0" width="375" height="95"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="95.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1 (708) 000-1234" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ipE-BI-sLL">
@ -877,7 +586,7 @@
<rect key="frame" x="0.0" y="96" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8rk-06-1ZS" id="hqv-P5-du9">
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Network Status" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uNq-FV-lwt">
@ -917,11 +626,11 @@
<rect key="frame" x="0.0" y="140" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="a7a-qe-87x" id="gcU-Ld-alv">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Invite Your Friends" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9FD-M0-WLe" userLabel="Invite Your Friends">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<rect key="frame" x="15" y="0.0" width="325" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
@ -934,11 +643,11 @@
<rect key="frame" x="0.0" y="184" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ITG-sW-Zn0" id="vOb-SA-SH2">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Privacy" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="i1f-DT-7rL">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<rect key="frame" x="15" y="0.0" width="325" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -951,11 +660,11 @@
<rect key="frame" x="0.0" y="228" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jp5-vZ-AhJ" id="sji-CJ-bhq">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Notifications" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tRQ-1p-6aT">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<rect key="frame" x="15" y="0.0" width="325" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -968,11 +677,11 @@
<rect key="frame" x="0.0" y="272" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wZ8-fs-Ylw" id="Ua5-nw-s2z">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Linked Devices" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hrc-lZ-NeA">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<rect key="frame" x="15" y="0.0" width="325" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -988,11 +697,11 @@
<rect key="frame" x="0.0" y="316" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Xx7-pz-aLN" id="pMA-vR-8Ae">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Advanced" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="dkL-Nz-E6H">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<rect key="frame" x="15" y="0.0" width="325" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -1005,11 +714,11 @@
<rect key="frame" x="0.0" y="360" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EI4-kQ-MMA" id="czg-5p-aVz">
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="About" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qeN-f1-cIQ">
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
<rect key="frame" x="15" y="0.0" width="325" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -1026,7 +735,7 @@
<rect key="frame" x="0.0" y="404" width="375" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="R82-FT-SEA" id="Ok9-fE-WhB">
<rect key="frame" x="0.0" y="0.0" width="375" height="99"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4Mk-ly-6fq">
@ -1184,7 +893,7 @@
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="cZ7-de-SUi" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="gzw-fh-en2">
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" translucent="NO" id="gzw-fh-en2">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="barTintColor" red="0.082137122750282288" green="0.46843802928924561" blue="0.91112053394317627" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -1211,7 +920,7 @@
<rect key="frame" x="0.0" y="22" width="375" height="59"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ld5-sX-pB8" id="EqP-87-4hZ">
<rect key="frame" x="0.0" y="0.0" width="375" height="58"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="58.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4zF-SU-q4z">
@ -1277,11 +986,11 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Pgm-Qb-oPu" id="amG-75-RNT">
<rect key="frame" x="0.0" y="0.0" width="342" height="47"/>
<rect key="frame" x="0.0" y="0.0" width="342" height="47.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Invite your friends!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="QGl-1D-W9D">
<rect key="frame" x="15" y="0.0" width="325" height="47"/>
<rect key="frame" x="15" y="0.0" width="325" height="47.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.09412795243864841" green="0.43645224658557435" blue="0.71380208333333339" alpha="1" colorSpace="calibratedRGB"/>
@ -1309,11 +1018,11 @@
<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="375" height="667"/>
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ukg-om-VX3" userLabel="Group Details">
<rect key="frame" x="0.0" y="20" width="375" height="100"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ul8-NY-i4c">
<rect key="frame" x="8" y="20" width="60" height="60"/>
@ -1348,7 +1057,7 @@
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsMultipleSelection="YES" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="cFo-AT-Srf">
<rect key="frame" x="0.0" y="128" width="375" height="539"/>
<rect key="frame" x="0.0" y="108" width="375" height="495"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="ekO-kw-iHV" userLabel="Header View">
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
@ -1373,11 +1082,11 @@
<rect key="frame" x="0.0" y="62" width="375" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yfF-Jl-bZ1" id="f0v-od-N9K">
<rect key="frame" x="0.0" y="0.0" width="375" height="59"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="a4j-OQ-ala">
<rect key="frame" x="15" y="0.0" width="345" height="59"/>
<rect key="frame" x="15" y="0.0" width="345" height="59.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -1468,17 +1177,11 @@
<image name="contact-options-action" width="44" height="44"/>
<image name="empty-group-avatar" width="53" height="53"/>
<image name="ic_devices_ios" width="180" height="119"/>
<image name="ic_lock_outline" width="32" height="32"/>
<image name="settings" width="44" height="44"/>
<image name="table_ic_hourglass_empty" width="32" height="32"/>
<image name="table_ic_timer" width="32" height="32"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
<segue reference="E8S-Yc-X7E"/>
</inferredMetricsTieBreakers>
</document>

View File

@ -14,6 +14,7 @@
#import "ShowGroupMembersViewController.h"
#import "UIFont+OWS.h"
#import "UIUtil.h"
#import "UIView+OWS.h"
#import <25519/Curve25519.h>
#import <SignalServiceKit/NSDate+millisecondTimeStamp.h>
#import <SignalServiceKit/OWSDisappearingConfigurationUpdateInfoMessage.h>
@ -36,26 +37,7 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
@interface OWSConversationSettingsTableViewController ()
@property (nonatomic) IBOutlet UITableViewCell *verifyPrivacyCell;
@property (nonatomic) IBOutlet UITableViewCell *blocklistStateCell;
@property (nonatomic) IBOutlet UITableViewCell *toggleDisappearingMessagesCell;
@property (nonatomic) IBOutlet UILabel *toggleDisappearingMessagesTitleLabel;
@property (nonatomic) IBOutlet UILabel *toggleDisappearingMessagesDescriptionLabel;
@property (nonatomic) IBOutlet UISwitch *disappearingMessagesSwitch;
@property (nonatomic) IBOutlet UITableViewCell *disappearingMessagesDurationCell;
@property (nonatomic) IBOutlet UILabel *disappearingMessagesDurationLabel;
@property (nonatomic) IBOutlet UISlider *disappearingMessagesDurationSlider;
@property (nonatomic) IBOutlet UIImageView *avatar;
@property (nonatomic) IBOutlet UILabel *nameLabel;
@property (nonatomic) IBOutlet UILabel *signalIdLabel;
@property (nonatomic) IBOutletCollection(UIImageView) NSArray *cellIcons;
@property (nonatomic) TSThread *thread;
@property (nonatomic) NSString *contactName;
@property (nonatomic) NSString *signalId;
@property (nonatomic) UIImage *avatarImage;
@property (nonatomic) BOOL isGroupThread;
@property (nonatomic) NSArray<NSNumber *> *disappearingMessagesDurations;
@property (nonatomic) OWSDisappearingMessagesConfiguration *disappearingMessagesConfiguration;
@ -65,8 +47,12 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
@property (nonatomic, readonly) OWSMessageSender *messageSender;
@property (nonatomic, readonly) OWSBlockingManager *blockingManager;
@property (nonatomic, readonly) UILabel *disappearingMessagesDurationLabel;
@end
#pragma mark -
@implementation OWSConversationSettingsTableViewController
- (instancetype)init
@ -112,20 +98,26 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
_blockingManager = [OWSBlockingManager sharedManager];
}
- (NSString *)threadName
{
NSString *threadName = self.thread.name;
if ([threadName isEqualToString:self.thread.contactIdentifier]) {
threadName =
[PhoneNumber bestEffortFormatPartialUserSpecifiedTextToLookLikeAPhoneNumber:self.thread.contactIdentifier];
} else if (threadName.length == 0 && [self isGroupThread]) {
threadName = NSLocalizedString(@"NEW_GROUP_DEFAULT_TITLE", @"");
}
return threadName;
}
- (BOOL)isGroupThread
{
return [self.thread isKindOfClass:[TSGroupThread class]];
}
- (void)configureWithThread:(TSThread *)thread
{
self.thread = thread;
self.signalId = thread.contactIdentifier;
self.contactName = thread.name;
if ([thread isKindOfClass:[TSGroupThread class]]) {
self.isGroupThread = YES;
if (self.contactName.length == 0) {
self.contactName = NSLocalizedString(@"NEW_GROUP_DEFAULT_TITLE", @"");
}
} else {
self.isGroupThread = NO;
}
}
#pragma mark - View Lifecycle
@ -143,28 +135,12 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
{
[super viewDidLoad];
self.nameLabel.text = self.contactName;
if (self.signalId) {
self.signalIdLabel.text =
[PhoneNumber bestEffortFormatPartialUserSpecifiedTextToLookLikeAPhoneNumber:self.signalId];
} else {
// Don't print anything for groups.
self.signalIdLabel.text = nil;
}
self.avatar.image = [OWSAvatarBuilder buildImageForThread:self.thread contactsManager:self.contactsManager];
self.nameLabel.font = [UIFont ows_dynamicTypeTitle2Font];
// Translations
self.title = NSLocalizedString(@"CONVERSATION_SETTINGS", @"title for conversation settings screen");
self.toggleDisappearingMessagesTitleLabel.text
= NSLocalizedString(@"DISAPPEARING_MESSAGES", @"table cell label in conversation settings");
self.toggleDisappearingMessagesDescriptionLabel.text
= NSLocalizedString(@"DISAPPEARING_MESSAGES_DESCRIPTION", @"subheading in conversation settings");
_disappearingMessagesDurationLabel = [UILabel new];
self.disappearingMessagesDurations = [OWSDisappearingMessagesConfiguration validDurationsSeconds];
self.disappearingMessagesDurationSlider.maximumValue = (float)(self.disappearingMessagesDurations.count - 1);
self.disappearingMessagesDurationSlider.minimumValue = 0;
self.disappearingMessagesDurationSlider.continuous = YES; // NO fires change event only once you let go
self.disappearingMessagesConfiguration =
[OWSDisappearingMessagesConfiguration fetchObjectWithUniqueID:self.thread.uniqueId];
@ -174,16 +150,6 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
[[OWSDisappearingMessagesConfiguration alloc] initDefaultWithThreadId:self.thread.uniqueId];
}
self.disappearingMessagesDurationSlider.value = self.disappearingMessagesConfiguration.durationIndex;
[self toggleDisappearingMessages:self.disappearingMessagesConfiguration.isEnabled];
// RADAR http://www.openradar.me/23759908
// Finding that occasionally the tabel icons are not being tinted
// i.e. rendered as white making them invisible.
for (UIImageView *cellIcon in self.cellIcons) {
[cellIcon tintColorDidChange];
}
[self updateTableContents];
}
@ -196,77 +162,141 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
// First section.
NSMutableArray *firstSectionItems = [NSMutableArray new];
OWSTableSection *firstSection = [OWSTableSection new];
firstSection.customHeaderView = [self firstSectionHeader];
firstSection.customHeaderHeight = @(100.f);
if (!self.isGroupThread && self.thread.hasSafetyNumbers) {
[firstSectionItems addObject:[OWSTableItem itemWithCustomCellBlock:^{
weakSelf.verifyPrivacyCell.textLabel.text
= NSLocalizedString(@"VERIFY_PRIVACY", @"table cell label in conversation settings");
return weakSelf.verifyPrivacyCell;
}
actionBlock:^{
[weakSelf
performSegueWithIdentifier:
@"OWSConversationSettingsTableViewControllerSegueSafetyNumbers"
sender:weakSelf];
}]];
}
[firstSectionItems addObject:[OWSTableItem itemWithCustomCellBlock:^{
weakSelf.toggleDisappearingMessagesCell.selectionStyle = UITableViewCellSelectionStyleNone;
return weakSelf.toggleDisappearingMessagesCell;
}
customRowHeight:108.f
actionBlock:nil]];
if (self.disappearingMessagesSwitch.isOn) {
[firstSectionItems addObject:[OWSTableItem itemWithCustomCellBlock:^{
weakSelf.disappearingMessagesDurationCell.selectionStyle = UITableViewCellSelectionStyleNone;
return weakSelf.disappearingMessagesDurationCell;
}
customRowHeight:76.f
actionBlock:nil]];
}
[contents addSection:[OWSTableSection sectionWithTitle:nil items:firstSectionItems]];
// Second section.
if (!self.isGroupThread) {
BOOL isBlocked = [[_blockingManager blockedPhoneNumbers] containsObject:self.signalId];
OWSTableItem *item = [OWSTableItem itemWithCustomCellBlock:^{
[firstSection addItem:[OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new];
cell.textLabel.text = NSLocalizedString(
@"CONVERSATION_SETTINGS_BLOCK_THIS_USER", @"table cell label in conversation settings");
cell.textLabel.textColor = [UIColor blackColor];
cell.textLabel.font = [UIFont ows_regularFontWithSize:17.f];
cell.textLabel.lineBreakMode = NSLineBreakByTruncatingTail;
UIImage *icon = [UIImage imageNamed:@"ic_block"];
OWSAssert(icon);
cell.imageView.image = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
cell.imageView.contentMode = UIViewContentModeScaleToFill;
cell.imageView.tintColor = [UIColor blackColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
UIImageView *iconView = [self viewForIconWithName:@"ic_lock_outline"];
[cell.contentView addSubview:iconView];
[iconView autoVCenterInSuperview];
[iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f];
UILabel *rowLabel = [UILabel new];
rowLabel.text = NSLocalizedString(@"VERIFY_PRIVACY", @"table cell label in conversation settings");
rowLabel.textColor = [UIColor blackColor];
rowLabel.font = [UIFont ows_regularFontWithSize:17.f];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[cell.contentView addSubview:rowLabel];
[rowLabel autoVCenterInSuperview];
[rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:16.f];
UISwitch *blockUserSwitch = [UISwitch new];
blockUserSwitch.on = isBlocked;
[blockUserSwitch addTarget:self
action:@selector(blockUserSwitchDidChange:)
forControlEvents:UIControlEventValueChanged];
cell.accessoryView = blockUserSwitch;
return cell;
}
actionBlock:nil];
OWSTableSection *section = [OWSTableSection sectionWithTitle:nil
items:@[
item,
]];
section.footerTitle = NSLocalizedString(@"BLOCK_BEHAVIOR_EXPLANATION",
@"An explanation of the consequences of blocking another user.");
[contents addSection:section];
actionBlock:^{
[weakSelf performSegueWithIdentifier:
@"OWSConversationSettingsTableViewControllerSegueSafetyNumbers"
sender:weakSelf];
}]];
}
// Third section.
[firstSection
addItem:[OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
UIView *topView = [UIView new];
[cell.contentView addSubview:topView];
[topView autoPinWidthToSuperview];
[topView autoPinEdgeToSuperviewEdge:ALEdgeTop];
[topView autoSetDimension:ALDimensionHeight toSize:kOWSTable_DefaultCellHeight];
UIImageView *iconView = [self viewForIconWithName:@"table_ic_timer"];
[topView addSubview:iconView];
[iconView autoVCenterInSuperview];
[iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f];
UILabel *rowLabel = [UILabel new];
rowLabel.text = NSLocalizedString(@"DISAPPEARING_MESSAGES", @"table cell label in conversation settings");
rowLabel.textColor = [UIColor blackColor];
rowLabel.font = [UIFont ows_regularFontWithSize:17.f];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[topView addSubview:rowLabel];
[rowLabel autoVCenterInSuperview];
[rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:16.f];
UISwitch *switchView = [UISwitch new];
switchView.on = self.disappearingMessagesConfiguration.isEnabled;
[switchView addTarget:self
action:@selector(disappearingMessagesSwitchValueDidChange:)
forControlEvents:UIControlEventValueChanged];
[topView addSubview:switchView];
[switchView autoVCenterInSuperview];
[switchView autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f];
UILabel *subtitleLabel = [UILabel new];
subtitleLabel.text
= NSLocalizedString(@"DISAPPEARING_MESSAGES_DESCRIPTION", @"subheading in conversation settings");
subtitleLabel.textColor = [UIColor blackColor];
subtitleLabel.font = [UIFont ows_footnoteFont];
subtitleLabel.numberOfLines = 0;
subtitleLabel.lineBreakMode = NSLineBreakByWordWrapping;
[cell.contentView addSubview:subtitleLabel];
[subtitleLabel autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:topView];
[subtitleLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:rowLabel];
[subtitleLabel autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f];
return cell;
}
// TODO: We shouldn't hard-code a row height that will contain the cell content.
customRowHeight:108.f
actionBlock:nil]];
if (self.disappearingMessagesConfiguration.isEnabled) {
[firstSection
addItem:[OWSTableItem
itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
UIView *topView = [UIView new];
[cell.contentView addSubview:topView];
[topView autoPinWidthToSuperview];
[topView autoPinEdgeToSuperviewEdge:ALEdgeTop];
[topView autoSetDimension:ALDimensionHeight toSize:kOWSTable_DefaultCellHeight];
UIImageView *iconView = [self viewForIconWithName:@"table_ic_hourglass_empty"];
[topView addSubview:iconView];
[iconView autoVCenterInSuperview];
[iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f];
UILabel *rowLabel = self.disappearingMessagesDurationLabel;
[self updateDisappearingMessagesDurationLabel];
rowLabel.textColor = [UIColor blackColor];
rowLabel.font = [UIFont ows_footnoteFont];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[topView addSubview:rowLabel];
[rowLabel autoVCenterInSuperview];
[rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:16.f];
UISlider *slider = [UISlider new];
slider.maximumValue = (float)(self.disappearingMessagesDurations.count - 1);
slider.minimumValue = 0;
slider.continuous = YES; // NO fires change event only once you let go
slider.value = self.disappearingMessagesConfiguration.durationIndex;
[slider addTarget:self
action:@selector(durationSliderDidChange:)
forControlEvents:UIControlEventValueChanged];
[cell.contentView addSubview:slider];
[slider autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:topView];
[slider autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:rowLabel];
[slider autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f];
return cell;
}
// TODO: We shouldn't hard-code a row height that will contain the cell content.
customRowHeight:84.f
actionBlock:nil]];
}
[contents addSection:firstSection];
// Group settings section.
if (self.isGroupThread) {
NSArray *groupItems = @[
@ -319,10 +349,193 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
items:groupItems]];
}
// Mute thread section.
OWSTableSection *muteSection = [OWSTableSection new];
[muteSection addItem:[OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
UIImageView *iconView = [self viewForIconWithName:@"ic_mute_thread"];
[cell.contentView addSubview:iconView];
[iconView autoVCenterInSuperview];
[iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f];
UILabel *rowLabel = [UILabel new];
rowLabel.text = NSLocalizedString(
@"CONVERSATION_SETTINGS_MUTE_LABEL", @"label for 'mute thread' cell in conversation settings");
rowLabel.textColor = [UIColor blackColor];
rowLabel.font = [UIFont ows_regularFontWithSize:17.f];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[cell.contentView addSubview:rowLabel];
[rowLabel autoVCenterInSuperview];
[rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:16.f];
NSString *muteStatus = NSLocalizedString(
@"CONVERSATION_SETTINGS_MUTE_NOT_MUTED", @"Indicates that the current thread is not muted.");
NSDate *mutedUntilDate = self.thread.mutedUntilDate;
NSDate *now = [NSDate date];
if (mutedUntilDate != nil && [mutedUntilDate timeIntervalSinceDate:now] > 0) {
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
NSCalendar *calendar = [NSCalendar currentCalendar];
[calendar setTimeZone:timeZone];
NSCalendarUnit calendarUnits = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay;
NSDateComponents *muteUntilComponents = [calendar components:calendarUnits fromDate:mutedUntilDate];
NSDateComponents *nowComponents = [calendar components:calendarUnits fromDate:now];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.calendar = calendar;
dateFormatter.timeZone = timeZone;
if (nowComponents.year != muteUntilComponents.year || nowComponents.month != muteUntilComponents.month
|| nowComponents.day != muteUntilComponents.day) {
[dateFormatter setDateStyle:NSDateFormatterShortStyle];
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
} else {
[dateFormatter setDateStyle:NSDateFormatterNoStyle];
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
}
muteStatus =
[NSString stringWithFormat:NSLocalizedString(@"CONVERSATION_SETTINGS_MUTED_UNTIL_FORMAT",
@"Indicates that this thread is muted until a given date or time. "
@"Embeds {{The date or time which the thread is muted until}}."),
[dateFormatter stringFromDate:mutedUntilDate]];
}
UILabel *statusLabel = [UILabel new];
statusLabel.textColor = [UIColor colorWithWhite:0.5f alpha:1.f];
statusLabel.font = [UIFont ows_regularFontWithSize:17.f];
statusLabel.text = muteStatus;
[cell.contentView addSubview:statusLabel];
[statusLabel autoVCenterInSuperview];
[statusLabel autoPinEdgeToSuperviewEdge:ALEdgeRight];
return cell;
}
customRowHeight:45.f
actionBlock:^{
[weakSelf showMuteUnmuteActionSheet];
}]];
muteSection.footerTitle
= NSLocalizedString(@"MUTE_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of muting a thread.");
[contents addSection:muteSection];
// Block user section.
if (!self.isGroupThread) {
BOOL isBlocked = [[_blockingManager blockedPhoneNumbers] containsObject:self.thread.contactIdentifier];
OWSTableItem *item = [OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
UIImageView *iconView = [self viewForIconWithName:@"ic_block"];
[cell.contentView addSubview:iconView];
[iconView autoVCenterInSuperview];
[iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f];
UILabel *rowLabel = [UILabel new];
rowLabel.text = NSLocalizedString(
@"CONVERSATION_SETTINGS_BLOCK_THIS_USER", @"table cell label in conversation settings");
rowLabel.textColor = [UIColor blackColor];
rowLabel.font = [UIFont ows_regularFontWithSize:17.f];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[cell.contentView addSubview:rowLabel];
[rowLabel autoVCenterInSuperview];
[rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:16.f];
UISwitch *blockUserSwitch = [UISwitch new];
blockUserSwitch.on = isBlocked;
[blockUserSwitch addTarget:self
action:@selector(blockUserSwitchDidChange:)
forControlEvents:UIControlEventValueChanged];
cell.accessoryView = blockUserSwitch;
return cell;
}
actionBlock:nil];
OWSTableSection *section = [OWSTableSection sectionWithTitle:nil
items:@[
item,
]];
section.footerTitle = NSLocalizedString(
@"BLOCK_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user.");
[contents addSection:section];
}
self.contents = contents;
[self.tableView reloadData];
}
- (UIView *)firstSectionHeader
{
UIView *firstSectionHeader = [UIView new];
UIView *threadInfoView = [UIView new];
[firstSectionHeader addSubview:threadInfoView];
[threadInfoView autoPinWidthToSuperviewWithMargin:16.f];
[threadInfoView autoPinHeightToSuperviewWithMargin:16.f];
UIImage *avatar = [OWSAvatarBuilder buildImageForThread:self.thread contactsManager:self.contactsManager];
OWSAssert(avatar);
const CGFloat kAvatarSize = 68.f;
UIImageView *avatarView = [[UIImageView alloc] initWithImage:avatar];
avatarView.layer.borderColor = UIColor.clearColor.CGColor;
avatarView.layer.masksToBounds = YES;
avatarView.layer.cornerRadius = kAvatarSize / 2.0f;
avatarView.contentMode = UIViewContentModeScaleAspectFill;
[threadInfoView addSubview:avatarView];
[avatarView autoVCenterInSuperview];
[avatarView autoPinEdgeToSuperviewEdge:ALEdgeLeft];
[avatarView autoSetDimension:ALDimensionWidth toSize:kAvatarSize];
[avatarView autoSetDimension:ALDimensionHeight toSize:kAvatarSize];
UIView *threadNameView = [UIView new];
[threadInfoView addSubview:threadNameView];
[threadNameView autoVCenterInSuperview];
[threadNameView autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:avatarView withOffset:16.f];
[threadNameView autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f];
UILabel *threadTitleLabel = [UILabel new];
threadTitleLabel.text = self.threadName;
threadTitleLabel.textColor = [UIColor blackColor];
threadTitleLabel.font = [UIFont ows_dynamicTypeTitle2Font];
threadTitleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[threadNameView addSubview:threadTitleLabel];
[threadTitleLabel autoPinEdgeToSuperviewEdge:ALEdgeTop];
[threadTitleLabel autoPinEdgeToSuperviewEdge:ALEdgeLeft];
if (![self isGroupThread] && ![self.thread.name isEqualToString:self.thread.contactIdentifier]) {
NSString *subtitle =
[PhoneNumber bestEffortFormatPartialUserSpecifiedTextToLookLikeAPhoneNumber:self.thread.contactIdentifier];
UILabel *threadSubtitleLabel = [UILabel new];
threadSubtitleLabel.text = subtitle;
threadSubtitleLabel.textColor = [UIColor blackColor];
// TODO:
threadSubtitleLabel.font = [UIFont ows_regularFontWithSize:12.f];
threadSubtitleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[threadNameView addSubview:threadSubtitleLabel];
[threadSubtitleLabel autoPinEdgeToSuperviewEdge:ALEdgeBottom];
[threadSubtitleLabel autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:threadTitleLabel];
[threadSubtitleLabel autoPinEdgeToSuperviewEdge:ALEdgeLeft];
} else {
[threadTitleLabel autoPinEdgeToSuperviewEdge:ALEdgeBottom];
}
return firstSectionHeader;
}
- (UIImageView *)viewForIconWithName:(NSString *)iconName
{
UIImage *icon = [UIImage imageNamed:iconName];
OWSAssert(icon);
UIImageView *iconView = [UIImageView new];
iconView.image = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
iconView.tintColor = [UIColor blackColor];
iconView.contentMode = UIViewContentModeScaleToFill;
[iconView autoSetDimension:ALDimensionWidth toSize:32.f];
[iconView autoSetDimension:ALDimensionHeight toSize:32.f];
return iconView;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
@ -357,14 +570,6 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
}
}
- (void)viewDidLayoutSubviews
{
// Round avatar corners.
self.avatar.layer.borderColor = UIColor.clearColor.CGColor;
self.avatar.layer.masksToBounds = YES;
self.avatar.layer.cornerRadius = self.avatar.frame.size.height / 2.0f;
}
#pragma mark - Actions
- (void)didTapLeaveGroup
@ -421,12 +626,10 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:YES];
}
- (IBAction)disappearingMessagesSwitchValueDidChange:(id)sender
- (void)disappearingMessagesSwitchValueDidChange:(UISwitch *)sender
{
if (![sender isKindOfClass:[UISwitch class]]) {
DDLogError(@"%@ Unexpected sender for disappearing messages switch: %@", self.tag, sender);
}
UISwitch *disappearingMessagesSwitch = (UISwitch *)sender;
[self toggleDisappearingMessages:disappearingMessagesSwitch.isOn];
[self updateTableContents];
@ -442,7 +645,7 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
}
UISwitch *blockUserSwitch = (UISwitch *)sender;
BOOL isCurrentlyBlocked = [[_blockingManager blockedPhoneNumbers] containsObject:self.signalId];
BOOL isCurrentlyBlocked = [[_blockingManager blockedPhoneNumbers] containsObject:self.thread.contactIdentifier];
if (blockUserSwitch.isOn) {
OWSAssert(!isCurrentlyBlocked);
@ -477,13 +680,10 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
{
self.disappearingMessagesConfiguration.enabled = flag;
// When this message is called as a result of the switch being flipped, this will be a no-op
// but it allows us to resuse the method to set the switch programmatically in view setup.
self.disappearingMessagesSwitch.on = flag;
[self durationSliderDidChange:self.disappearingMessagesDurationSlider];
[self.tableView reloadData];
}
- (IBAction)durationSliderDidChange:(UISlider *)slider
- (void)durationSliderDidChange:(UISlider *)slider
{
// snap the slider to a valid value
NSUInteger index = (NSUInteger)(slider.value + 0.5);
@ -491,6 +691,11 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
NSNumber *numberOfSeconds = self.disappearingMessagesDurations[index];
self.disappearingMessagesConfiguration.durationSeconds = [numberOfSeconds unsignedIntValue];
[self updateDisappearingMessagesDurationLabel];
}
- (void)updateDisappearingMessagesDurationLabel
{
if (self.disappearingMessagesConfiguration.isEnabled) {
NSString *keepForFormat = NSLocalizedString(@"KEEP_MESSAGES_DURATION",
@"Slider label embeds {{TIME_AMOUNT}}, e.g. '2 hours'. See *_TIME_AMOUNT strings for examples.");
@ -500,6 +705,136 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
self.disappearingMessagesDurationLabel.text
= NSLocalizedString(@"KEEP_MESSAGES_FOREVER", @"Slider label when disappearing messages is off");
}
[self.disappearingMessagesDurationLabel setNeedsLayout];
[self.disappearingMessagesDurationLabel.superview setNeedsLayout];
}
- (void)showMuteUnmuteActionSheet
{
NSString *title;
NSString *message = nil;
if (self.thread.isMuted) {
title = NSLocalizedString(
@"CONVERSATION_SETTINGS_UNMUTE_ACTION_SHEET_TITLE", @"Title of the 'unmute this thread' action sheet.");
} else {
title = NSLocalizedString(
@"CONVERSATION_SETTINGS_MUTE_ACTION_SHEET_TITLE", @"Title of the 'mute this thread' action sheet.");
message = NSLocalizedString(
@"MUTE_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of muting a thread.");
}
UIAlertController *actionSheetController =
[UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleActionSheet];
__weak OWSConversationSettingsTableViewController *weakSelf = self;
if (self.thread.isMuted) {
UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"CONVERSATION_SETTINGS_UNMUTE_ACTION",
@"Label for button to unmute a thread.")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *_Nonnull ignore) {
[weakSelf setThreadMutedUntilDate:nil];
}];
[actionSheetController addAction:action];
} else {
#ifdef DEBUG
[actionSheetController
addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"CONVERSATION_SETTINGS_MUTE_ONE_MINUTE_ACTION",
@"Label for button to mute a thread for a minute.")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *_Nonnull ignore) {
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
NSCalendar *calendar = [NSCalendar currentCalendar];
[calendar setTimeZone:timeZone];
NSDateComponents *dateComponents = [NSDateComponents new];
[dateComponents setMinute:1];
NSDate *mutedUntilDate =
[calendar dateByAddingComponents:dateComponents
toDate:[NSDate date]
options:0];
[weakSelf setThreadMutedUntilDate:mutedUntilDate];
}]];
#endif
[actionSheetController
addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"CONVERSATION_SETTINGS_MUTE_ONE_HOUR_ACTION",
@"Label for button to mute a thread for a hour.")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *_Nonnull ignore) {
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
NSCalendar *calendar = [NSCalendar currentCalendar];
[calendar setTimeZone:timeZone];
NSDateComponents *dateComponents = [NSDateComponents new];
[dateComponents setHour:1];
NSDate *mutedUntilDate =
[calendar dateByAddingComponents:dateComponents
toDate:[NSDate date]
options:0];
[weakSelf setThreadMutedUntilDate:mutedUntilDate];
}]];
[actionSheetController
addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"CONVERSATION_SETTINGS_MUTE_ONE_DAY_ACTION",
@"Label for button to mute a thread for a day.")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *_Nonnull ignore) {
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
NSCalendar *calendar = [NSCalendar currentCalendar];
[calendar setTimeZone:timeZone];
NSDateComponents *dateComponents = [NSDateComponents new];
[dateComponents setDay:1];
NSDate *mutedUntilDate =
[calendar dateByAddingComponents:dateComponents
toDate:[NSDate date]
options:0];
[weakSelf setThreadMutedUntilDate:mutedUntilDate];
}]];
[actionSheetController
addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"CONVERSATION_SETTINGS_MUTE_ONE_WEEK_ACTION",
@"Label for button to mute a thread for a week.")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *_Nonnull ignore) {
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
NSCalendar *calendar = [NSCalendar currentCalendar];
[calendar setTimeZone:timeZone];
NSDateComponents *dateComponents = [NSDateComponents new];
[dateComponents setDay:7];
NSDate *mutedUntilDate =
[calendar dateByAddingComponents:dateComponents
toDate:[NSDate date]
options:0];
[weakSelf setThreadMutedUntilDate:mutedUntilDate];
}]];
[actionSheetController
addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"CONVERSATION_SETTINGS_MUTE_ONE_YEAR_ACTION",
@"Label for button to mute a thread for a year.")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *_Nonnull ignore) {
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
NSCalendar *calendar = [NSCalendar currentCalendar];
[calendar setTimeZone:timeZone];
NSDateComponents *dateComponents = [NSDateComponents new];
[dateComponents setYear:1];
NSDate *mutedUntilDate =
[calendar dateByAddingComponents:dateComponents
toDate:[NSDate date]
options:0];
[weakSelf setThreadMutedUntilDate:mutedUntilDate];
}]];
}
UIAlertAction *dismissAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"")
style:UIAlertActionStyleCancel
handler:nil];
[actionSheetController addAction:dismissAction];
[self presentViewController:actionSheetController animated:YES completion:nil];
}
- (void)setThreadMutedUntilDate:(nullable NSDate *)value
{
[self.thread updateWithMutedUntilDate:value];
[self.tableView reloadData];
}
#pragma mark - Navigation
@ -516,7 +851,7 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
OWSFingerprint *fingerprint = [fingerprintBuilder fingerprintWithTheirSignalId:self.thread.contactIdentifier];
[controller configureWithThread:self.thread fingerprint:fingerprint contactName:self.contactName];
[controller configureWithThread:self.thread fingerprint:fingerprint contactName:[self threadName]];
controller.dismissDelegate = self;
} else if ([segue.identifier isEqualToString:OWSConversationSettingsTableViewControllerSegueUpdateGroup]) {
NewGroupViewController *vc = [segue destinationViewController];

View File

@ -6,6 +6,8 @@
NS_ASSUME_NONNULL_BEGIN
extern const CGFloat kOWSTable_DefaultCellHeight;
@class OWSTableItem;
@class OWSTableSection;
@ -24,6 +26,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, nullable) NSString *headerTitle;
@property (nonatomic, nullable) NSString *footerTitle;
@property (nonatomic, nullable) UIView *customHeaderView;
@property (nonatomic, nullable) UIView *customFooterView;
@property (nonatomic, nullable) NSNumber *customHeaderHeight;
@property (nonatomic, nullable) NSNumber *customFooterHeight;
+ (OWSTableSection *)sectionWithTitle:(nullable NSString *)title items:(NSArray<OWSTableItem *> *)items;
- (void)addItem:(OWSTableItem *)item;
@ -62,9 +69,10 @@ typedef UITableViewCell *_Nonnull (^OWSTableCustomCellBlock)();
#pragma mark -
@interface OWSTableViewController : UITableViewController
@interface OWSTableViewController : UIViewController
@property (nonatomic) OWSTableContents *contents;
@property (nonatomic, readonly) UITableView *tableView;
#pragma mark - Presentation

View File

@ -3,9 +3,12 @@
//
#import "OWSTableViewController.h"
#import "UIView+OWS.h"
NS_ASSUME_NONNULL_BEGIN
const CGFloat kOWSTable_DefaultCellHeight = 45.f;
@interface OWSTableContents ()
@property (nonatomic) NSMutableArray<OWSTableSection *> *sections;
@ -156,6 +159,14 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark -
@interface OWSTableViewController () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic) UITableView *tableView;
@end
#pragma mark -
NSString * const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
@implementation OWSTableViewController
@ -166,11 +177,6 @@ NSString * const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
[self.navigationController.navigationBar setTranslucent:NO];
}
- (instancetype)init
{
return [super initWithStyle:UITableViewStyleGrouped];
}
- (void)loadView
{
[super loadView];
@ -178,8 +184,15 @@ NSString * const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
OWSAssert(self.contents);
self.title = self.contents.title;
OWSAssert(self.tableView);
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self.view addSubview:self.tableView];
[self.tableView autoPinWidthToSuperview];
[self.tableView autoPinToTopLayoutGuideOfViewController:self withInset:0.f];
[self.tableView autoPinToBottomLayoutGuideOfViewController:self withInset:0.f];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:kOWSTableCellIdentifier];
}
@ -256,7 +269,37 @@ NSString * const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
if (item.customRowHeight) {
return [item.customRowHeight floatValue];
}
return [super tableView:tableView heightForRowAtIndexPath:indexPath];
return kOWSTable_DefaultCellHeight;
}
- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)sectionIndex
{
OWSTableSection *section = [self sectionForIndex:sectionIndex];
return section.customHeaderView;
}
- (nullable UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)sectionIndex
{
OWSTableSection *section = [self sectionForIndex:sectionIndex];
return section.customFooterView;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)sectionIndex
{
OWSTableSection *section = [self sectionForIndex:sectionIndex];
if (section && section.customHeaderHeight) {
return [section.customHeaderHeight floatValue];
}
return UITableViewAutomaticDimension;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)sectionIndex
{
OWSTableSection *section = [self sectionForIndex:sectionIndex];
if (section && section.customFooterHeight) {
return [section.customFooterHeight floatValue];
}
return UITableViewAutomaticDimension;
}
// Called before the user changes the selection. Return a new indexPath, or nil, to change the proposed selection.

View File

@ -149,6 +149,10 @@
inThread:(TSThread *)thread
contactsManager:(id<ContactsManagerProtocol>)contactsManager
{
if (thread.isMuted) {
return;
}
NSString *messageDescription = message.description;
if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive && messageDescription) {

View File

@ -27,5 +27,6 @@
+ (UIFont *)ows_dynamicTypeBodyFont;
+ (UIFont *)ows_dynamicTypeTitle2Font;
+ (UIFont *)ows_infoMessageFont;
+ (UIFont *)ows_footnoteFont;
@end

View File

@ -70,6 +70,11 @@
return [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline];
}
+ (UIFont *)ows_footnoteFont
{
return [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote];
}
+ (UIFont *)ows_dynamicTypeTitle2Font {
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(9, 0)) {
return [UIFont preferredFontForTextStyle:UIFontTextStyleTitle2];

View File

@ -235,6 +235,39 @@
/* table cell label in conversation settings */
"CONVERSATION_SETTINGS_BLOCK_THIS_USER" = "Block this user";
/* Title of the 'mute this thread' action sheet. */
"CONVERSATION_SETTINGS_MUTE_ACTION_SHEET_TITLE" = "Mute";
/* label for 'mute thread' cell in conversation settings */
"CONVERSATION_SETTINGS_MUTE_LABEL" = "Mute";
/* Indicates that the current thread is not muted. */
"CONVERSATION_SETTINGS_MUTE_NOT_MUTED" = "Not muted";
/* Label for button to mute a thread for a day. */
"CONVERSATION_SETTINGS_MUTE_ONE_DAY_ACTION" = "Mute for one day";
/* Label for button to mute a thread for a hour. */
"CONVERSATION_SETTINGS_MUTE_ONE_HOUR_ACTION" = "Mute for one hour";
/* Label for button to mute a thread for a minute. */
"CONVERSATION_SETTINGS_MUTE_ONE_MINUTE_ACTION" = "Mute for one minute";
/* Label for button to mute a thread for a week. */
"CONVERSATION_SETTINGS_MUTE_ONE_WEEK_ACTION" = "Mute for one week";
/* Label for button to mute a thread for a year. */
"CONVERSATION_SETTINGS_MUTE_ONE_YEAR_ACTION" = "Mute for one year";
/* Indicates that this thread is muted until a given date or time. Embeds {{The date or time which the thread is muted until}}. */
"CONVERSATION_SETTINGS_MUTED_UNTIL_FORMAT" = "until %@";
/* Label for button to unmute a thread. */
"CONVERSATION_SETTINGS_UNMUTE_ACTION" = "Unmute";
/* Title of the 'unmute this thread' action sheet. */
"CONVERSATION_SETTINGS_UNMUTE_ACTION_SHEET_TITLE" = "Unmute";
/* ActionSheet title */
"CORRUPTED_SESSION_DESCRIPTION" = "Resetting your session will allow you to receive future messages from %@, but it will not recover any already corrupted messages.";
@ -615,6 +648,9 @@
/* No comment provided by engineer. */
"MULTIDEVICE_PAIRING_MAX_RECOVERY" = "You have reached the maximum of devices you can currently pair with your account. Please remove a device or try again to pair it later.";
/* An explanation of the consequences of muting a thread. */
"MUTE_BEHAVIOR_EXPLANATION" = "You will not receive notifications for muted threads.";
/* No comment provided by engineer. */
"NETWORK_ERROR_RECOVERY" = "Please check you're online and try again.";