- Implemented Message History Deleting from Local DB

This commit is contained in:
Muhammad Khalid 2021-09-07 22:22:43 +05:00
parent 27e096a7ce
commit be17e6bb46
8 changed files with 244 additions and 115 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="vAU-gJ-Tx3">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<device id="retina6_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
@ -16,30 +16,30 @@
<objects>
<viewController storyboardIdentifier="ChatsListViewController" title="Chats" id="9pv-A4-QxB" customClass="ChatsListViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="90" sectionHeaderHeight="28" sectionFooterHeight="28" id="3ug-3t-4BD">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ChatsListTableViewCellNew" rowHeight="66" id="0IJ-1b-Ma3" customClass="ChatsListTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="24.333333969116211" width="375" height="66"/>
<rect key="frame" x="0.0" y="24.333333969116211" width="428" height="66"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0IJ-1b-Ma3" id="f45-bS-0LJ">
<rect key="frame" x="0.0" y="0.0" width="375" height="66"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="66"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bw5-x2-Cry">
<rect key="frame" x="70" y="3" width="299" height="60"/>
<rect key="frame" x="70" y="3" width="352" height="60"/>
<subviews>
<view opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="200" translatesAutoresizingMaskIntoConstraints="NO" id="i0O-Zv-fEx">
<rect key="frame" x="0.0" y="0.0" width="299" height="20.666666666666668"/>
<rect key="frame" x="0.0" y="0.0" width="352" height="20.666666666666668"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Chat with" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qr0-8H-IJq">
<rect key="frame" x="0.0" y="0.0" width="227.66666666666666" height="20.666666666666668"/>
<rect key="frame" x="0.0" y="0.0" width="280.66666666666669" height="20.666666666666668"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Timestamp" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ga8-2K-hxE">
<rect key="frame" x="227.66666666666671" y="0.0" width="71.333333333333343" height="20.666666666666668"/>
<rect key="frame" x="280.66666666666669" y="0.0" width="71.333333333333314" height="20.666666666666668"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="14"/>
<nil key="highlightedColor"/>
</label>
@ -55,7 +55,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="200" text="Last message" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumFontSize="13" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wE7-Lf-1a4">
<rect key="frame" x="0.0" y="21.666666666666668" width="299" height="38.333333333333329"/>
<rect key="frame" x="0.0" y="21.666666666666668" width="352" height="38.333333333333329"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="14"/>
<nil key="highlightedColor"/>
</label>
@ -157,11 +157,11 @@
<objects>
<viewController storyboardIdentifier="ChatViewController" title="Chat" id="WP2-Cp-7ZE" customClass="ChatViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" opaque="NO" contentMode="scaleToFill" id="MXY-a0-pWq">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gYg-Wz-iZc">
<rect key="frame" x="0.0" y="0.0" width="375" height="641"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="755"/>
<connections>
<segue destination="GGV-aa-8IC" kind="embed" id="585-T5-dGR"/>
</connections>
@ -179,7 +179,7 @@
<nil key="title"/>
<barButtonItem key="backBarButtonItem" title="Back" id="Dx3-QU-3cN"/>
<view key="titleView" contentMode="scaleToFill" id="fc4-l0-VbW" customClass="ChatTitleView" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="35.666666666666657" y="2" width="304" height="40"/>
<rect key="frame" x="62" y="2" width="304" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="752" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" verticalCompressionResistancePriority="751" text="Jane Done" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UWL-vQ-lxc">
@ -232,7 +232,7 @@
<objects>
<navigationController id="Vme-Fz-tNU" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="3da-sf-ndC">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<rect key="frame" x="0.0" y="44" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="barTintColor" name="chatslistBackground"/>
</navigationBar>
@ -249,17 +249,17 @@
<objects>
<viewController storyboardIdentifier="SendLocationViewController" id="Dpu-gT-0aH" customClass="SendLocationViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="7e8-2E-mCc">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="1f2-gi-WCW">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
</mapView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="W1p-QZ-jTV">
<rect key="frame" x="10" y="728" width="355" height="50"/>
<rect key="frame" x="10" y="842" width="408" height="50"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5tI-9V-tVB">
<rect key="frame" x="0.0" y="0.0" width="355" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="408" height="50"/>
<color key="backgroundColor" name="chatslistBackground"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<state key="normal" title="Send Current Location">
@ -319,7 +319,7 @@
<objects>
<viewController storyboardIdentifier="emptyDetailViewController" id="sks-Bw-Z68" customClass="EmptyViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="2uN-Ke-AFc">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="z5H-oQ-jNc"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
@ -335,22 +335,22 @@
<objects>
<viewController restorationIdentifier="SetupViewController" storyboardIdentifier="SetupViewController" id="ib9-Sm-LTl" userLabel="Setup View Controller" customClass="SetupViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="wsj-r3-ZjG">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Siskin IM" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V18-Iv-6Re">
<rect key="frame" x="117.66666666666667" y="413.66666666666669" width="139.66666666666663" height="38.666666666666686"/>
<rect key="frame" x="144" y="459.33333333333331" width="140" height="38.666666666666686"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="32"/>
<nil key="highlightedColor"/>
<size key="shadowOffset" width="0.0" height="0.0"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="by Tigase, Inc." textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8ba-yZ-XRA">
<rect key="frame" x="134.66666666666669" y="452.33333333333331" width="145.66666666666669" height="26.333333333333314"/>
<rect key="frame" x="161" y="498" width="146" height="26.333333333333371"/>
<fontDescription key="fontDescription" name="HelveticaNeue-MediumItalic" family="Helvetica Neue" pointSize="22"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WyQ-cb-VAl">
<rect key="frame" x="16" y="655" width="343" height="41"/>
<rect key="frame" x="20" y="769" width="388" height="41"/>
<color key="backgroundColor" name="tintColor"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<inset key="contentEdgeInsets" minX="0.0" minY="10" maxX="0.0" maxY="10"/>
@ -362,7 +362,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZzM-t7-zvW">
<rect key="frame" x="16" y="717" width="343" height="41"/>
<rect key="frame" x="20" y="831" width="388" height="41"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<inset key="contentEdgeInsets" minX="0.0" minY="10" maxX="0.0" maxY="10"/>
<state key="normal" title="Sign in to an existing XMPP account">
@ -373,7 +373,7 @@
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="appLogo" translatesAutoresizingMaskIntoConstraints="NO" id="P5D-Hi-rSq">
<rect key="frame" x="25" y="69" width="325" height="324.66666666666669"/>
<rect key="frame" x="28.666666666666657" y="69" width="370.66666666666674" height="370.33333333333331"/>
<constraints>
<constraint firstAttribute="width" secondItem="P5D-Hi-rSq" secondAttribute="height" multiplier="1:1" id="ZYD-Yr-y5b"/>
</constraints>
@ -448,20 +448,20 @@
<objects>
<tableViewController id="mps-t3-QBq" customClass="RosterViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="dbg-Pp-Ujo">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="separatorColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="RosterItemTableViewCell" selectionStyle="none" indentationWidth="10" reuseIdentifier="RosterItemTableViewCell" rowHeight="48" id="ONc-pU-DYD" customClass="RosterItemTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="24.333333969116211" width="375" height="48"/>
<rect key="frame" x="0.0" y="24.333333969116211" width="428" height="48"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="ONc-pU-DYD" id="UqK-Bi-A4U">
<rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="48"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="cbu-SQ-mtx">
<rect key="frame" x="2" y="2" width="371" height="44"/>
<rect key="frame" x="2" y="2" width="424" height="44"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PEi-Gx-E77" customClass="AvatarStatusView" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
@ -485,15 +485,15 @@
</connections>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="fPJ-VF-UlI">
<rect key="frame" x="54" y="0.0" width="317" height="44"/>
<rect key="frame" x="54" y="0.0" width="370" height="44"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vEG-as-CLS">
<rect key="frame" x="0.0" y="0.0" width="317" height="26"/>
<rect key="frame" x="0.0" y="0.0" width="370" height="26"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tRD-rd-7dm">
<rect key="frame" x="0.0" y="26" width="317" height="18"/>
<rect key="frame" x="0.0" y="26" width="370" height="18"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="15"/>
<nil key="highlightedColor"/>
</label>
@ -544,7 +544,7 @@
<tabBarItem key="tabBarItem" title="Chats" image="message.fill" catalog="system" id="acW-dT-cKf"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="7zK-CH-Y1Y">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<rect key="frame" x="0.0" y="44" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" name="chatslistBackground"/>
<color key="tintColor" name="tintColor"/>
@ -572,7 +572,7 @@
<navigationController storyboardIdentifier="ChatViewNavigationController" automaticallyAdjustsScrollViewInsets="NO" id="XmR-SP-8PN" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="ZXL-ae-Ls9">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<rect key="frame" x="0.0" y="44" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="tintColor" name="tintColor"/>
<color key="barTintColor" name="chatslistBackground"/>
@ -609,7 +609,7 @@
</tabBarItem>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="QfB-Do-9or">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<rect key="frame" x="0.0" y="44" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" name="chatslistBackground"/>
<color key="tintColor" name="tintColor"/>
@ -633,7 +633,7 @@
<navigationController storyboardIdentifier="RosterItemEditNavigationController" id="DqK-vA-tM9" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="c2l-7V-bZB">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<rect key="frame" x="0.0" y="44" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="tintColor" name="tintColor"/>
<color key="barTintColor" name="chatslistBackground"/>
@ -655,21 +655,21 @@
<objects>
<tableViewController id="WDE-Vb-oKK" customClass="RosterItemEditViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="Ock-Af-3IY">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<sections>
<tableViewSection headerTitle="Account" id="Mfv-HJ-QDO">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="mk1-zp-AU3">
<rect key="frame" x="0.0" y="49" width="375" height="44"/>
<rect key="frame" x="0.0" y="49" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mk1-zp-AU3" id="Da1-kS-KYt">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="local_user@example.com" placeholder="Select account" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gXY-yq-Y2K">
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
<rect key="frame" x="20" y="0.0" width="388" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits"/>
</textField>
@ -687,14 +687,14 @@
<tableViewSection headerTitle="JID" id="Qgj-eQ-geg">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="ubC-3x-1ej">
<rect key="frame" x="0.0" y="142.66666603088379" width="375" height="44"/>
<rect key="frame" x="0.0" y="142.66666603088379" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ubC-3x-1ej" id="6FY-Rq-hWY">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="local_user@example.com" placeholder="Enter jid" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="BM3-28-huR">
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
<rect key="frame" x="20" y="0.0" width="388" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits" keyboardType="emailAddress"/>
</textField>
@ -712,14 +712,14 @@
<tableViewSection headerTitle="Name" id="Kfl-J5-hdD">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="bnU-C3-Ei1">
<rect key="frame" x="0.0" y="236.33333206176758" width="375" height="44"/>
<rect key="frame" x="0.0" y="236.33333206176758" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bnU-C3-Ei1" id="sWs-wY-Vy8">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Juliet Capulet" placeholder="Enter display name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="OGf-mX-8z3">
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
<rect key="frame" x="20" y="0.0" width="388" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits"/>
</textField>
@ -737,20 +737,20 @@
<tableViewSection headerTitle="PRESENCE" id="Q28-Ig-9NP">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="yky-H4-cbk">
<rect key="frame" x="0.0" y="329.99999809265137" width="375" height="44"/>
<rect key="frame" x="0.0" y="329.99999809265137" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yky-H4-cbk" id="Qga-yz-bXa">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Send presence updates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="upM-mW-rMZ">
<rect key="frame" x="16" y="11.666666666666664" width="180.66666666666666" height="21"/>
<rect key="frame" x="20" y="11.666666666666664" width="180.66666666666666" height="21"/>
<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="dOv-Qh-hdZ">
<rect key="frame" x="310" y="6.6666666666666679" width="51" height="31.000000000000004"/>
<rect key="frame" x="359" y="6.6666666666666679" width="51" height="31.000000000000004"/>
</switch>
</subviews>
<constraints>
@ -763,20 +763,20 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="GLY-Pk-gl9">
<rect key="frame" x="0.0" y="373.99999809265137" width="375" height="44"/>
<rect key="frame" x="0.0" y="373.99999809265137" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="GLY-Pk-gl9" id="P7U-6w-pcx">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Receive presence updates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ffo-7n-Tn2">
<rect key="frame" x="16" y="11.666666666666664" width="201" height="21"/>
<rect key="frame" x="20" y="11.666666666666664" width="201" height="21"/>
<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="QIs-qT-dLK">
<rect key="frame" x="310" y="6.6666666666666679" width="51" height="31.000000000000004"/>
<rect key="frame" x="359" y="6.6666666666666679" width="51" height="31.000000000000004"/>
</switch>
</subviews>
<constraints>
@ -823,45 +823,48 @@
<!--Informations-->
<scene sceneID="kJ5-M5-UxC">
<objects>
<tableViewController id="rSR-7g-CFO" customClass="ContactViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController storyboardIdentifier="ContactViewController" id="rSR-7g-CFO" customClass="ContactViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" sectionFooterHeight="18" id="NKE-a4-JkF">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="BasicInfoCell" rowHeight="94" id="C58-uk-LaV" customClass="ContactBasicTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="49" width="375" height="94"/>
<rect key="frame" x="0.0" y="49" width="428" height="94"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="C58-uk-LaV" id="ZeZ-oS-SaN">
<rect key="frame" x="0.0" y="0.0" width="375" height="94"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="94"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="34W-5a-mO1">
<rect key="frame" x="16" y="11" width="60" height="60"/>
<rect key="frame" x="20" y="11" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="1cR-NX-9Qr"/>
<constraint firstAttribute="height" constant="60" id="nSG-p5-eAy"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="John Doe" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="koS-ci-GqT">
<rect key="frame" x="84" y="8" width="275" height="21"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="John Doe" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="koS-ci-GqT">
<rect key="frame" x="88" y="11" width="320" height="21"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Company, Inc." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0rT-oB-jot">
<rect key="frame" x="84" y="33" width="275" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="749" text="Company, Inc." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0rT-oB-jot">
<rect key="frame" x="88" y="36" width="320" height="11"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="user@example.com" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rOe-Pg-XBh">
<rect key="frame" x="84" y="53" width="275" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="user@example.com" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rOe-Pg-XBh">
<rect key="frame" x="88" y="51" width="320" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="using test@example.com" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Zq-Ql-WA0">
<rect key="frame" x="84" y="73" width="275" height="13.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="using test@example.com" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Zq-Ql-WA0">
<rect key="frame" x="88" y="71" width="320" height="12"/>
<constraints>
<constraint firstAttribute="height" constant="12" id="AV3-vs-7NN"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
@ -895,20 +898,20 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="ContactFormCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="ContactFormCell" rowHeight="51" id="pQL-wq-Sb9" customClass="ContactFormTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="143" width="375" height="51"/>
<rect key="frame" x="0.0" y="143" width="428" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="pQL-wq-Sb9" id="9Se-nj-MAA">
<rect key="frame" x="0.0" y="0.0" width="375" height="51"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Type" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yxF-LM-meS">
<rect key="frame" x="16" y="6" width="343" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Type" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yxF-LM-meS">
<rect key="frame" x="20" y="9" width="388" height="14.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" name="tintColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="b03-5W-Imh">
<rect key="frame" x="24" y="24" width="335" height="21"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="b03-5W-Imh">
<rect key="frame" x="28" y="25.666666666666671" width="380" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -930,20 +933,20 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="AddressCell" rowHeight="80" id="73R-lk-SWh" customClass="ContactFormTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="194" width="375" height="80"/>
<rect key="frame" x="0.0" y="194" width="428" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="73R-lk-SWh" id="AoC-2k-RUL">
<rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Type" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="agd-7n-AkX">
<rect key="frame" x="16" y="6" width="343" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="Type" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="agd-7n-AkX">
<rect key="frame" x="20" y="9" width="388" height="14.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" name="tintColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Address" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="DZS-A8-CWS">
<rect key="frame" x="24" y="24" width="335" height="51"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Address" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="DZS-A8-CWS">
<rect key="frame" x="28" y="25.666666666666671" width="380" height="47"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -965,14 +968,14 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="BlockContactCell" textLabel="kwQ-p7-cX2" rowHeight="44" style="IBUITableViewCellStyleDefault" id="Mn6-i8-kwI">
<rect key="frame" x="0.0" y="274" width="375" height="44"/>
<rect key="frame" x="0.0" y="274" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Mn6-i8-kwI" id="0S2-hp-vS3">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Block contact" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kwQ-p7-cX2">
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
<rect key="frame" x="20" y="0.0" width="388" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@ -982,14 +985,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MuteContactCell" textLabel="g8N-kr-fax" rowHeight="44" style="IBUITableViewCellStyleDefault" id="rXF-fn-cOY">
<rect key="frame" x="0.0" y="318" width="375" height="44"/>
<rect key="frame" x="0.0" y="318" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rXF-fn-cOY" id="Cfg-a8-bA5">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Mute contact" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="g8N-kr-fax">
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
<rect key="frame" x="20" y="0.0" width="388" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@ -999,21 +1002,21 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="OMEMOEncryptionCell" textLabel="XZp-oZ-XpC" detailTextLabel="vIB-ar-uog" rowHeight="44" style="IBUITableViewCellStyleValue1" id="EPN-iV-X5r" customClass="OMEMOEncryptionSwitchTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="362" width="375" height="44"/>
<rect key="frame" x="0.0" y="362" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EPN-iV-X5r" id="cx2-fQ-N3b">
<rect key="frame" x="0.0" y="0.0" width="349.33333333333331" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="398.33333333333331" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Message encryption" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="XZp-oZ-XpC">
<rect key="frame" x="16" y="11.999999999999998" width="154.33333333333334" height="20.333333333333332"/>
<rect key="frame" x="20" y="11.999999999999998" width="154.33333333333334" height="20.333333333333332"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="vIB-ar-uog">
<rect key="frame" x="297.66666666666663" y="11.999999999999998" width="43.666666666666664" height="20.333333333333332"/>
<rect key="frame" x="346.66666666666663" y="11.999999999999998" width="43.666666666666664" height="20.333333333333332"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
@ -1023,14 +1026,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="OMEMOIdentityCell" rowHeight="60" id="3q3-ov-q6z" customClass="OMEMOIdentityTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="406" width="375" height="60"/>
<rect key="frame" x="0.0" y="406" width="428" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3q3-ov-q6z" id="ArO-fK-TDf">
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="diN-oY-G54">
<rect key="frame" x="10" y="13" width="241" height="34"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="diN-oY-G54">
<rect key="frame" x="10" y="13" width="324.33333333333331" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="P0U-51-Isi"/>
</constraints>
@ -1044,8 +1047,8 @@
</attributedString>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bsQ-Fj-zSv">
<rect key="frame" x="261" y="14.666666666666664" width="51" height="31"/>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bsQ-Fj-zSv">
<rect key="frame" x="369" y="14.666666666666664" width="51" height="31"/>
<connections>
<action selector="valueChanged:" destination="3q3-ov-q6z" eventType="valueChanged" id="YOR-XP-dbc"/>
</connections>
@ -1065,14 +1068,14 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="AttachmentsCell" textLabel="EpU-tc-DIx" rowHeight="44" style="IBUITableViewCellStyleDefault" id="09h-vH-qSu">
<rect key="frame" x="0.0" y="466" width="375" height="44"/>
<rect key="frame" x="0.0" y="466" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="09h-vH-qSu" id="Khc-ES-FDl">
<rect key="frame" x="0.0" y="0.0" width="349.33333333333331" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="398.33333333333331" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Attachments" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="EpU-tc-DIx">
<rect key="frame" x="16" y="0.0" width="325.33333333333331" height="44"/>
<rect key="frame" x="20" y="0.0" width="370.33333333333331" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@ -1084,6 +1087,23 @@
<segue destination="N9z-ms-iaT" kind="show" identifier="chatShowAttachments" id="tSJ-Sm-lhD"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="ClearHistoryCell" textLabel="qjs-BY-Nid" rowHeight="44" style="IBUITableViewCellStyleDefault" id="B47-IG-b97">
<rect key="frame" x="0.0" y="510" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="B47-IG-b97" id="vsw-L3-YyE">
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Clear History" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qjs-BY-Nid">
<rect key="frame" x="20" y="0.0" width="388" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="rSR-7g-CFO" id="lPG-hT-w4i"/>
@ -1113,7 +1133,7 @@
<navigationController restorationIdentifier="ContactViewNavigationController" storyboardIdentifier="ContactViewNavigationController" automaticallyAdjustsScrollViewInsets="NO" id="JIC-ew-OGP" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="26o-Nz-6qA">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<rect key="frame" x="0.0" y="44" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
@ -1130,21 +1150,21 @@
<objects>
<viewController storyboardIdentifier="NewFeatureSuggestionView" modalPresentationStyle="formSheet" id="Z9W-jo-gSy" customClass="NewFeatureSuggestionView" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="nB0-oQ-Zoc">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Message Archiving" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ckp-Mb-v0c">
<rect key="frame" x="83.666666666666671" y="64" width="207.66666666666663" height="29"/>
<rect key="frame" x="110" y="64" width="208" height="29"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="24"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your server for account \(account) supports message archiving. Would you like to enable this feature?" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" minimumScaleFactor="0.59999999999999998" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1dk-YA-RVu">
<rect key="frame" x="25.333333333333343" y="285.33333333333331" width="324.33333333333326" height="324.99999999999994"/>
<rect key="frame" x="20" y="308.33333333333337" width="388" height="370.33333333333337"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wvT-dz-RVz">
<rect key="frame" x="30" y="736" width="61" height="32"/>
<rect key="frame" x="30" y="850" width="61" height="32"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="Not now"/>
<connections>
@ -1152,17 +1172,17 @@
</connections>
</button>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="ApQ-D1-Gfw">
<rect key="frame" x="169" y="387.66666666666669" width="37" height="37"/>
<rect key="frame" x="195.66666666666666" y="444.66666666666669" width="37" height="37"/>
<color key="color" name="selectedMenuItemColor" catalog="System" colorSpace="catalog"/>
</activityIndicatorView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="messageArchiving" translatesAutoresizingMaskIntoConstraints="NO" id="j8I-n6-mj7">
<rect key="frame" x="106.33333333333333" y="113.00000000000001" width="162.33333333333337" height="162.33333333333337"/>
<rect key="frame" x="121.33333333333333" y="113.00000000000001" width="185.33333333333337" height="185.33333333333337"/>
<constraints>
<constraint firstAttribute="width" secondItem="j8I-n6-mj7" secondAttribute="height" multiplier="1:1" id="MAF-hM-QM0"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yJk-Px-1oo">
<rect key="frame" x="291" y="735.66666666666663" width="54" height="33"/>
<rect key="frame" x="344" y="849.66666666666663" width="54" height="33"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
<state key="normal" title="Enable"/>
<connections>
@ -1215,7 +1235,7 @@
<objects>
<collectionViewController storyboardIdentifier="ChatAttachmentsController" title="Attachments" id="N9z-ms-iaT" customClass="ChatAttachmentsController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="cHc-Jl-VKK">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="2" minimumInteritemSpacing="2" id="mzE-f3-Idj">
@ -1264,7 +1284,7 @@
<objects>
<viewController storyboardIdentifier="SettingsNavigationControllerDummy" useStoryboardIdentifierAsRestorationIdentifier="YES" id="w4Y-E8-hif" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="cLl-kf-X7x">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="KbB-FL-79t"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>

View file

@ -376,6 +376,27 @@
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle=" History" id="552-vb-Heg">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="wNk-Ce-zfI" style="IBUITableViewCellStyleDefault" id="kUN-Hr-2a1">
<rect key="frame" x="0.0" y="542" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="kUN-Hr-2a1" id="oeh-ap-pGo">
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Delete History" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wNk-Ce-zfI">
<rect key="frame" x="20" y="0.0" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="IGA-uE-mHb" id="iEv-vE-Trn"/>

View file

@ -86,10 +86,8 @@ class BaseChatViewControllerWithDataSourceAndContextMenuAndToolbar: BaseChatView
cell.contentView.transform = .identity;
let view = UIViewController();
let size = self.conversationLogController!.tableView.rectForRow(at: indexPath).size;
print("cell:", (cell as? ChatTableViewCell)?.messageTextView.text);
view.view = cell.contentView;
view.preferredContentSize = size;
print("view size:", view.preferredContentSize)
return view;
}) { suggestedActions -> UIMenu? in
return self.prepareContextMenu(for: indexPath);

View file

@ -98,6 +98,7 @@ class ContactViewController: UITableViewController {
sections.append(.settings);
sections.append(.attachments);
sections.append(.encryption);
sections.append(.clearHistory)
}
if phones.count > 0 {
sections.append(.phones);
@ -112,6 +113,25 @@ class ContactViewController: UITableViewController {
tableView.reloadData();
}
func clearChatHistory() {
let alert = UIAlertController(title: "Clear History", message: "This will delete all the message history for this chat. Continue?", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Continue", style: .default, handler: { (action) in
DBChatHistoryStore.instance.removeHistory(for: self.account, with: self.jid)
self.dismiss(animated: true, completion: {
if let vc = UIApplication.topViewController() as? ChatViewController {
vc.conversationLogController?.dataSource.refreshData(unread: 0) { _ in
vc.conversationLogController?.tableView.reloadData()
let chat = DBChatStore.instance.getChat(for: self.account, with: self.jid) as? DBChat
chat?.removeLastMessage()
NotificationCenter.default.post(name: DBChatStore.CHAT_UPDATED, object: vc.chat)
}
}
})
}))
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
self.present(alert, animated: true, completion: nil)
}
// MARK: - Table view data source
override func numberOfSections(in: UITableView) -> Int {
@ -120,12 +140,10 @@ class ContactViewController: UITableViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection sectionNo: Int) -> Int {
switch sections[sectionNo] {
case .basic:
case .basic, .clearHistory, .attachments:
return 1;
case .settings:
return 3;
case .attachments:
return 1;
case .encryption:
return omemoIdentities.count + 1;
case .phones:
@ -162,6 +180,9 @@ class ContactViewController: UITableViewController {
cell.vcard = vcard;
return cell;
case .clearHistory:
let cell = tableView.dequeueReusableCell(withIdentifier: "ClearHistoryCell", for: indexPath)
return cell
case .settings:
switch SettingsOptions(rawValue: indexPath.row)! {
case .mute:
@ -287,9 +308,6 @@ class ContactViewController: UITableViewController {
cell.labelView.text = text;
return cell;
// default:
// let cell = tableView.dequeueReusableCell(withIdentifier: "ContactFormCell", for: indexPath as IndexPath) as! ContactFormTableViewCell;
// return cell;
}
}
@ -305,6 +323,8 @@ class ContactViewController: UITableViewController {
switch sections[indexPath.section] {
case .basic:
return;
case .clearHistory:
clearChatHistory()
case .settings:
switch SettingsOptions(rawValue: indexPath.row)! {
case .blockAndReport:
@ -543,6 +563,7 @@ class ContactViewController: UITableViewController {
case phones
case emails
case addresses
case clearHistory
var label: String {
switch self {
@ -560,6 +581,8 @@ class ContactViewController: UITableViewController {
return "Emails";
case .addresses:
return "Addresses";
case .clearHistory:
return "History"
}
}
}
@ -571,3 +594,5 @@ class ContactViewController: UITableViewController {
}
}

View file

@ -729,6 +729,10 @@ class DBChat: Chat, DBChatProtocol {
return true;
}
func removeLastMessage() {
lastActivity = LastChatActivity.message("", direction: MessageDirection.outgoing, sender: nil)
}
func markAsRead(count: Int) -> Bool {
guard unread > 0 else {
return false;
@ -852,6 +856,10 @@ class DBRoom: Room, DBChatProtocol {
setPassword(password);
}
func removeLastMessage() {
lastActivity = LastChatActivity.message("", direction: MessageDirection.outgoing, sender: nil)
}
fileprivate func setPassword(_ pass: String?) {
self.password = pass;
}

View file

@ -216,6 +216,10 @@ class MucChatSettingsViewController: UITableViewController, UIImagePickerControl
self.navigationController?.pushViewController(controller, animated: true);
}
}
if indexPath.section == 4 {
clearChatHistory()
}
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
@ -227,6 +231,27 @@ class MucChatSettingsViewController: UITableViewController, UIImagePickerControl
}
}
func clearChatHistory() {
let alert = UIAlertController(title: "Clear History", message: "This will delete all the message history for this chat. Continue?", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Continue", style: .default, handler: { (action) in
DBChatHistoryStore.instance.removeHistory(for: self.account, with: self.room.roomJid)
self.dismiss(animated: true, completion: {
if let vc = UIApplication.topViewController() as? MucChatViewController {
vc.dataSource.refreshData(unread: 0) { _ in
vc.conversationLogController?.tableView.reloadData()
let chat = DBChatStore.instance.getChat(for: self.account, with: self.room.roomJid) as? DBRoom
chat?.removeLastMessage()
NotificationCenter.default.post(name: DBChatStore.CHAT_UPDATED, object: vc.chat)
}
}
})
}))
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
self.present(alert, animated: true, completion: nil)
}
@objc func editClicked(_ sender: UIBarButtonItem) {
let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet);
alertController.addAction(UIAlertAction(title: "Rename chat", style: .default, handler: { (action) in

View file

@ -62,4 +62,13 @@ class GlobalSplitViewController: UISplitViewController, UISplitViewControllerDel
return nil;
}
var _detailViewController: UIViewController? {
get {
if viewControllers.count > 1 {
return viewControllers[1]
}
return nil
}
}
}

View file

@ -7,6 +7,7 @@
//
import Foundation
import UIKit
extension TimeInterval {
@ -41,3 +42,25 @@ extension Comparable {
return min(max(self, limits.lowerBound), limits.upperBound)
}
}
extension UIApplication {
class func topViewController(controller: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController? {
if let splitController = controller as? GlobalSplitViewController, let first = splitController.viewControllers.first {
return topViewController(controller: first)
}
if let navigationController = controller as? UINavigationController {
return topViewController(controller: navigationController.visibleViewController)
}
if let tabController = controller as? UITabBarController {
if let selected = tabController.selectedViewController {
return topViewController(controller: selected)
}
}
if let presented = controller?.presentedViewController {
return topViewController(controller: presented)
}
return controller
}
}