Settings and thread fixes.

This commit is contained in:
Frederic Jacobs 2014-11-26 16:00:10 +01:00
parent f1c92b229a
commit b22579d8f8
14 changed files with 134 additions and 289 deletions

View File

@ -328,7 +328,7 @@
B63761EE19E1FBE8005735D1 /* HttpRequestUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B63761E919E1FBE8005735D1 /* HttpRequestUtil.m */; };
B63761EF19E1FBE8005735D1 /* HttpResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = B63761EB19E1FBE8005735D1 /* HttpResponse.m */; };
B63AF5C71A1F757900D01AAD /* TSContactsIntersectionRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B63AF5AD1A1F757900D01AAD /* TSContactsIntersectionRequest.m */; };
B63AF5C81A1F757900D01AAD /* TSDeregisterAccountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B63AF5AF1A1F757900D01AAD /* TSDeregisterAccountRequest.m */; };
B63AF5C81A1F757900D01AAD /* TSUnregisterAccountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B63AF5AF1A1F757900D01AAD /* TSUnregisterAccountRequest.m */; };
B63AF5C91A1F757900D01AAD /* TSRecipientPrekeyRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B63AF5B11A1F757900D01AAD /* TSRecipientPrekeyRequest.m */; };
B63AF5CA1A1F757900D01AAD /* TSRegisterForPushRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B63AF5B31A1F757900D01AAD /* TSRegisterForPushRequest.m */; };
B63AF5CB1A1F757900D01AAD /* TSRegisterPrekeysRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B63AF5B51A1F757900D01AAD /* TSRegisterPrekeysRequest.m */; };
@ -395,6 +395,7 @@
B6B1013C196D213F007E3930 /* SignalKeyingStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B1013B196D213F007E3930 /* SignalKeyingStorage.m */; };
B6B9ECFC198B31BA00C620D3 /* PushManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B9ECFB198B31BA00C620D3 /* PushManager.m */; };
B6C93C4E199567AD00EDF894 /* DebugLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = B6C93C4D199567AD00EDF894 /* DebugLogger.m */; };
B6CBF53F1A254BD1000D4184 /* ContactDetailCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B6CBF53E1A254BD1000D4184 /* ContactDetailCell.m */; };
B90418E6183E9DD40038554A /* DateUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B90418E5183E9DD40038554A /* DateUtil.m */; };
B90418E7183E9DD40038554A /* DateUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B90418E5183E9DD40038554A /* DateUtil.m */; };
B96A3100187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf in Resources */ = {isa = PBXBuildFile; fileRef = B96A30FE187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf */; };
@ -906,8 +907,8 @@
B63761EB19E1FBE8005735D1 /* HttpResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HttpResponse.m; sourceTree = "<group>"; };
B63AF5AC1A1F757900D01AAD /* TSContactsIntersectionRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSContactsIntersectionRequest.h; sourceTree = "<group>"; };
B63AF5AD1A1F757900D01AAD /* TSContactsIntersectionRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSContactsIntersectionRequest.m; sourceTree = "<group>"; };
B63AF5AE1A1F757900D01AAD /* TSDeregisterAccountRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSDeregisterAccountRequest.h; sourceTree = "<group>"; };
B63AF5AF1A1F757900D01AAD /* TSDeregisterAccountRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSDeregisterAccountRequest.m; sourceTree = "<group>"; };
B63AF5AE1A1F757900D01AAD /* TSUnregisterAccountRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSUnregisterAccountRequest.h; sourceTree = "<group>"; };
B63AF5AF1A1F757900D01AAD /* TSUnregisterAccountRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSUnregisterAccountRequest.m; sourceTree = "<group>"; };
B63AF5B01A1F757900D01AAD /* TSRecipientPrekeyRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSRecipientPrekeyRequest.h; sourceTree = "<group>"; };
B63AF5B11A1F757900D01AAD /* TSRecipientPrekeyRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSRecipientPrekeyRequest.m; sourceTree = "<group>"; };
B63AF5B21A1F757900D01AAD /* TSRegisterForPushRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSRegisterForPushRequest.h; sourceTree = "<group>"; };
@ -1070,6 +1071,8 @@
B6B9ECFB198B31BA00C620D3 /* PushManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PushManager.m; sourceTree = "<group>"; };
B6C93C4C199567AD00EDF894 /* DebugLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugLogger.h; sourceTree = "<group>"; };
B6C93C4D199567AD00EDF894 /* DebugLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DebugLogger.m; sourceTree = "<group>"; };
B6CBF53D1A254BD1000D4184 /* ContactDetailCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContactDetailCell.h; path = "Signal/src/view controllers/ContactDetailCell.h"; sourceTree = SOURCE_ROOT; };
B6CBF53E1A254BD1000D4184 /* ContactDetailCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ContactDetailCell.m; path = "Signal/src/view controllers/ContactDetailCell.m"; sourceTree = SOURCE_ROOT; };
B90418E4183E9DD40038554A /* DateUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateUtil.h; sourceTree = "<group>"; };
B90418E5183E9DD40038554A /* DateUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateUtil.m; sourceTree = "<group>"; };
B96A30FE187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "HelveticaNeueLTStd-Bd.otf"; sourceTree = "<group>"; };
@ -1876,6 +1879,8 @@
76EB052B18170B33006006FC /* views */ = {
isa = PBXGroup;
children = (
B6CBF53D1A254BD1000D4184 /* ContactDetailCell.h */,
B6CBF53E1A254BD1000D4184 /* ContactDetailCell.m */,
FCAC963D19FEF99A0046DFC5 /* InboxTableViewCell.h */,
FCAC963E19FEF99A0046DFC5 /* InboxTableViewCell.m */,
FCAFC33D1A0F948F00AE5136 /* ActionContactDetailCell.h */,
@ -2177,8 +2182,8 @@
children = (
B63AF5AC1A1F757900D01AAD /* TSContactsIntersectionRequest.h */,
B63AF5AD1A1F757900D01AAD /* TSContactsIntersectionRequest.m */,
B63AF5AE1A1F757900D01AAD /* TSDeregisterAccountRequest.h */,
B63AF5AF1A1F757900D01AAD /* TSDeregisterAccountRequest.m */,
B63AF5AE1A1F757900D01AAD /* TSUnregisterAccountRequest.h */,
B63AF5AF1A1F757900D01AAD /* TSUnregisterAccountRequest.m */,
B63AF5B01A1F757900D01AAD /* TSRecipientPrekeyRequest.h */,
B63AF5B11A1F757900D01AAD /* TSRecipientPrekeyRequest.m */,
B63AF5B21A1F757900D01AAD /* TSRegisterForPushRequest.h */,
@ -3407,6 +3412,7 @@
B6B0968B1A1D25ED008BFAA6 /* TSStorageManager+SignedPreKeyStore.m in Sources */,
B6B0966E1A1D25ED008BFAA6 /* TSGroupMessageManager.m in Sources */,
76EB05AC18170B33006006FC /* SrtpSocket.m in Sources */,
B6CBF53F1A254BD1000D4184 /* ContactDetailCell.m in Sources */,
FCB11D931A12A4AA002F93FB /* FullImageViewController.m in Sources */,
B6B096871A1D25ED008BFAA6 /* TSStorageManager+IdentityKeyStore.m in Sources */,
B60C16651988999D00E97A6C /* VersionMigrations.m in Sources */,
@ -3499,7 +3505,7 @@
B6B096921A1D25ED008BFAA6 /* NSData+hexString.m in Sources */,
B6019E971A2492AB001118DF /* NSDate+millisecondTimeStamp.mm in Sources */,
B63761ED19E1FBE8005735D1 /* HttpRequestOrResponse.m in Sources */,
B63AF5C81A1F757900D01AAD /* TSDeregisterAccountRequest.m in Sources */,
B63AF5C81A1F757900D01AAD /* TSUnregisterAccountRequest.m in Sources */,
76EB05A018170B33006006FC /* IpAddress.m in Sources */,
B6B096651A1D25ED008BFAA6 /* TSGroupThread.m in Sources */,
FCAC965119FF0A6E0046DFC5 /* MessagesViewController.m in Sources */,

View File

@ -2389,7 +2389,7 @@ Licensed under the GPLv3</string>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5zF-Ko-9qU" id="gr7-Sm-bcs">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Dylan Bourgeois" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Pu-Cs-0K2">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Registered Number" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Pu-Cs-0K2">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="29" id="Qtv-Rd-0jb"/>
@ -2408,7 +2408,7 @@ Licensed under the GPLv3</string>
</mask>
</variation>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+41 70 980 28 19" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ipE-BI-sLL">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+1 28381283 8321" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ipE-BI-sLL">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Thin" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
@ -2471,103 +2471,6 @@ Licensed under the GPLv3</string>
</tableViewSection>
<tableViewSection id="JqD-8c-dMF">
<cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="hideContactImages" rowHeight="60" id="GLm-pT-xW9" customClass="SettingsTableViewCell">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="GLm-pT-xW9" id="ueW-vg-af2">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hide Contact Images" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JZV-e1-3Dr">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JDi-8K-9c2">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="mdl-wy-TdI"/>
<constraint firstAttribute="width" constant="62" id="mtL-xe-9yb"/>
</constraints>
<fontDescription key="fontDescription" name="HelveticaNeue-Thin" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
<variation key="default">
<mask key="constraints">
<exclude reference="mdl-wy-TdI"/>
<exclude reference="mtL-xe-9yb"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="constraints">
<include reference="mdl-wy-TdI"/>
<include reference="mtL-xe-9yb"/>
</mask>
</variation>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="A20-Bn-4PI">
<rect key="frame" x="-25" y="-15" width="51" height="31"/>
</switch>
</subviews>
<constraints>
<constraint firstItem="JDi-8K-9c2" firstAttribute="leading" secondItem="ueW-vg-af2" secondAttribute="leadingMargin" constant="7" id="9FV-Ke-2dm"/>
<constraint firstItem="A20-Bn-4PI" firstAttribute="leading" secondItem="JZV-e1-3Dr" secondAttribute="trailing" constant="21" id="CDt-7r-7ud">
<variation key="heightClass=regular-widthClass=compact" constant="8"/>
</constraint>
<constraint firstItem="JZV-e1-3Dr" firstAttribute="leading" secondItem="ueW-vg-af2" secondAttribute="leadingMargin" id="L92-WY-B5d">
<variation key="heightClass=regular-widthClass=compact" constant="7"/>
</constraint>
<constraint firstItem="JDi-8K-9c2" firstAttribute="top" secondItem="JZV-e1-3Dr" secondAttribute="bottom" constant="-1.5" id="PJ8-e5-Svt">
<variation key="heightClass=regular-widthClass=compact" constant="-0.5"/>
</constraint>
<constraint firstAttribute="trailingMargin" secondItem="JZV-e1-3Dr" secondAttribute="trailing" constant="70" id="Qm6-sv-MNV"/>
<constraint firstItem="A20-Bn-4PI" firstAttribute="top" secondItem="ueW-vg-af2" secondAttribute="topMargin" constant="-2" id="WEp-xl-c58">
<variation key="heightClass=regular-widthClass=compact" constant="6"/>
</constraint>
<constraint firstItem="JZV-e1-3Dr" firstAttribute="top" secondItem="ueW-vg-af2" secondAttribute="topMargin" constant="3" id="wyg-SY-Pqy"/>
<constraint firstItem="A20-Bn-4PI" firstAttribute="trailing" secondItem="ueW-vg-af2" secondAttribute="trailingMargin" id="yKe-4v-jNd">
<variation key="heightClass=regular-widthClass=compact" constant="-13"/>
</constraint>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="JZV-e1-3Dr"/>
<exclude reference="JDi-8K-9c2"/>
<exclude reference="A20-Bn-4PI"/>
</mask>
<mask key="constraints">
<exclude reference="9FV-Ke-2dm"/>
<exclude reference="PJ8-e5-Svt"/>
<exclude reference="L92-WY-B5d"/>
<exclude reference="Qm6-sv-MNV"/>
<exclude reference="wyg-SY-Pqy"/>
<exclude reference="CDt-7r-7ud"/>
<exclude reference="WEp-xl-c58"/>
<exclude reference="yKe-4v-jNd"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="subviews">
<include reference="JZV-e1-3Dr"/>
<include reference="JDi-8K-9c2"/>
<include reference="A20-Bn-4PI"/>
</mask>
<mask key="constraints">
<include reference="9FV-Ke-2dm"/>
<include reference="PJ8-e5-Svt"/>
<include reference="L92-WY-B5d"/>
<exclude reference="Qm6-sv-MNV"/>
<include reference="wyg-SY-Pqy"/>
<include reference="CDt-7r-7ud"/>
<include reference="WEp-xl-c58"/>
<include reference="yKe-4v-jNd"/>
</mask>
</variation>
</tableViewCellContentView>
<connections>
<outlet property="state" destination="JDi-8K-9c2" id="4yc-jw-5Nk"/>
<outlet property="toggle" destination="A20-Bn-4PI" id="jht-zv-3ln"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="60" id="quP-Cu-8LE" customClass="SettingsTableViewCell">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="quP-Cu-8LE" id="i03-Ww-QZz">
@ -2664,163 +2567,6 @@ Licensed under the GPLv3</string>
<outlet property="toggle" destination="skL-aj-42C" id="6hk-50-dsy"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="60" id="NBG-VW-o6F" customClass="SettingsTableViewCell">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="NBG-VW-o6F" id="x8y-8N-HFA">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Disable Autocorrect" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3bf-ux-QWH">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Disabled" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cov-Kl-m6s">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Thin" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="IId-Qg-DA6">
<rect key="frame" x="-25" y="-15" width="51" height="31"/>
</switch>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="3bf-ux-QWH" secondAttribute="trailing" constant="70" id="6Mu-fb-Kmv"/>
<constraint firstItem="3bf-ux-QWH" firstAttribute="top" secondItem="x8y-8N-HFA" secondAttribute="topMargin" constant="3" id="83d-GK-p1X"/>
<constraint firstItem="IId-Qg-DA6" firstAttribute="top" secondItem="x8y-8N-HFA" secondAttribute="topMargin" constant="-2" id="GJd-1e-Mb0">
<variation key="heightClass=regular-widthClass=compact" constant="6"/>
</constraint>
<constraint firstItem="IId-Qg-DA6" firstAttribute="leading" secondItem="3bf-ux-QWH" secondAttribute="trailing" constant="21" id="MjE-BL-5IZ">
<variation key="heightClass=regular-widthClass=compact" constant="8"/>
</constraint>
<constraint firstItem="cov-Kl-m6s" firstAttribute="top" secondItem="3bf-ux-QWH" secondAttribute="bottom" constant="-1.5" id="Mqd-Oc-qgD">
<variation key="heightClass=regular-widthClass=compact" constant="-0.5"/>
</constraint>
<constraint firstItem="IId-Qg-DA6" firstAttribute="trailing" secondItem="x8y-8N-HFA" secondAttribute="trailingMargin" id="NZA-tV-cT9">
<variation key="heightClass=regular-widthClass=compact" constant="-13"/>
</constraint>
<constraint firstItem="cov-Kl-m6s" firstAttribute="leading" secondItem="x8y-8N-HFA" secondAttribute="leadingMargin" constant="7" id="Ur1-kM-Y0r"/>
<constraint firstItem="3bf-ux-QWH" firstAttribute="leading" secondItem="x8y-8N-HFA" secondAttribute="leadingMargin" id="txI-su-8SR">
<variation key="heightClass=regular-widthClass=compact" constant="7"/>
</constraint>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="3bf-ux-QWH"/>
<exclude reference="cov-Kl-m6s"/>
<exclude reference="IId-Qg-DA6"/>
</mask>
<mask key="constraints">
<exclude reference="6Mu-fb-Kmv"/>
<exclude reference="83d-GK-p1X"/>
<exclude reference="txI-su-8SR"/>
<exclude reference="Mqd-Oc-qgD"/>
<exclude reference="Ur1-kM-Y0r"/>
<exclude reference="GJd-1e-Mb0"/>
<exclude reference="MjE-BL-5IZ"/>
<exclude reference="NZA-tV-cT9"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="subviews">
<include reference="3bf-ux-QWH"/>
<include reference="cov-Kl-m6s"/>
<include reference="IId-Qg-DA6"/>
</mask>
<mask key="constraints">
<exclude reference="6Mu-fb-Kmv"/>
<include reference="83d-GK-p1X"/>
<include reference="txI-su-8SR"/>
<include reference="Mqd-Oc-qgD"/>
<include reference="Ur1-kM-Y0r"/>
<include reference="GJd-1e-Mb0"/>
<include reference="MjE-BL-5IZ"/>
<include reference="NZA-tV-cT9"/>
</mask>
</variation>
</tableViewCellContentView>
<connections>
<outlet property="toggle" destination="IId-Qg-DA6" id="XNY-a9-0c8"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="60" id="YIb-4U-M9b">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="YIb-4U-M9b" id="0Pe-jR-C5U">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Disable History Log" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c57-Ga-ACt">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Disabled" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oWl-fH-WtG">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Thin" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6k7-G8-Mvt">
<rect key="frame" x="-25" y="-15" width="51" height="31"/>
</switch>
</subviews>
<constraints>
<constraint firstItem="c57-Ga-ACt" firstAttribute="top" secondItem="0Pe-jR-C5U" secondAttribute="topMargin" constant="3" id="IWq-n3-tTE"/>
<constraint firstItem="c57-Ga-ACt" firstAttribute="leading" secondItem="0Pe-jR-C5U" secondAttribute="leadingMargin" id="RqZ-b8-7w6">
<variation key="heightClass=regular-widthClass=compact" constant="7"/>
</constraint>
<constraint firstAttribute="trailingMargin" secondItem="c57-Ga-ACt" secondAttribute="trailing" constant="70" id="W1F-HE-ZBH"/>
<constraint firstItem="6k7-G8-Mvt" firstAttribute="leading" secondItem="c57-Ga-ACt" secondAttribute="trailing" constant="21" id="ceu-w0-kYq">
<variation key="heightClass=regular-widthClass=compact" constant="8"/>
</constraint>
<constraint firstItem="oWl-fH-WtG" firstAttribute="leading" secondItem="0Pe-jR-C5U" secondAttribute="leadingMargin" constant="7" id="iGg-gv-gdv"/>
<constraint firstItem="6k7-G8-Mvt" firstAttribute="top" secondItem="0Pe-jR-C5U" secondAttribute="topMargin" constant="-2" id="joe-ZQ-7yI">
<variation key="heightClass=regular-widthClass=compact" constant="6"/>
</constraint>
<constraint firstItem="oWl-fH-WtG" firstAttribute="top" secondItem="c57-Ga-ACt" secondAttribute="bottom" constant="-1.5" id="kM3-2d-3lt">
<variation key="heightClass=regular-widthClass=compact" constant="-0.5"/>
</constraint>
<constraint firstItem="6k7-G8-Mvt" firstAttribute="trailing" secondItem="0Pe-jR-C5U" secondAttribute="trailingMargin" id="yzG-ql-d7k">
<variation key="heightClass=regular-widthClass=compact" constant="-13"/>
</constraint>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="c57-Ga-ACt"/>
<exclude reference="oWl-fH-WtG"/>
<exclude reference="6k7-G8-Mvt"/>
</mask>
<mask key="constraints">
<exclude reference="IWq-n3-tTE"/>
<exclude reference="RqZ-b8-7w6"/>
<exclude reference="W1F-HE-ZBH"/>
<exclude reference="iGg-gv-gdv"/>
<exclude reference="kM3-2d-3lt"/>
<exclude reference="ceu-w0-kYq"/>
<exclude reference="joe-ZQ-7yI"/>
<exclude reference="yzG-ql-d7k"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="subviews">
<include reference="c57-Ga-ACt"/>
<include reference="oWl-fH-WtG"/>
<include reference="6k7-G8-Mvt"/>
</mask>
<mask key="constraints">
<include reference="IWq-n3-tTE"/>
<include reference="RqZ-b8-7w6"/>
<exclude reference="W1F-HE-ZBH"/>
<include reference="iGg-gv-gdv"/>
<include reference="kM3-2d-3lt"/>
<include reference="ceu-w0-kYq"/>
<include reference="joe-ZQ-7yI"/>
<include reference="yzG-ql-d7k"/>
</mask>
</variation>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" rowHeight="60" id="qa9-qm-gch">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="qa9-qm-gch" id="TLw-od-YLh">
@ -3024,6 +2770,62 @@ Licensed under the GPLv3</string>
</variation>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" rowHeight="60" id="oyZ-2D-g0x">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="oyZ-2D-g0x" id="1uC-gH-Uix">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Unregister" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Sfh-Oe-zHD">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="307" id="1K4-4S-8z2"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
<variation key="default">
<mask key="constraints">
<exclude reference="1K4-4S-8z2"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="constraints">
<include reference="1K4-4S-8z2"/>
</mask>
</variation>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="Sfh-Oe-zHD" secondAttribute="trailing" constant="70" id="2Yi-Ys-ktP"/>
<constraint firstItem="Sfh-Oe-zHD" firstAttribute="leading" secondItem="1uC-gH-Uix" secondAttribute="leadingMargin" id="9g3-QT-YQ4">
<variation key="heightClass=regular-widthClass=compact" constant="7"/>
</constraint>
<constraint firstItem="Sfh-Oe-zHD" firstAttribute="top" secondItem="1uC-gH-Uix" secondAttribute="topMargin" constant="3" id="MLH-1z-7aq">
<variation key="heightClass=regular-widthClass=compact" constant="11"/>
</constraint>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="Sfh-Oe-zHD"/>
</mask>
<mask key="constraints">
<exclude reference="2Yi-Ys-ktP"/>
<exclude reference="9g3-QT-YQ4"/>
<exclude reference="MLH-1z-7aq"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="subviews">
<include reference="Sfh-Oe-zHD"/>
</mask>
<mask key="constraints">
<exclude reference="2Yi-Ys-ktP"/>
<include reference="9g3-QT-YQ4"/>
<include reference="MLH-1z-7aq"/>
</mask>
</variation>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
@ -3033,6 +2835,9 @@ Licensed under the GPLv3</string>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Settings" id="Yrv-vP-ZVP"/>
<connections>
<outlet property="registeredNumber" destination="ipE-BI-sLL" id="emG-hV-7kX"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b8Q-ui-1Tb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>

View File

@ -88,8 +88,8 @@
+ (RPAPICall*)unregister {
RPAPICall *apiCall = [self defaultAPICall];
apiCall.method = HTTP_GET;
apiCall.endPoint = @"/users/directory";
apiCall.method = HTTP_DELETE;
apiCall.endPoint = @"/apn";
apiCall.requestSerializer = [self otpAuthenticationSerializer];
return apiCall;
}

View File

@ -72,6 +72,8 @@ typedef void(^failedVerificationBlock)(NSError *error);
#endif
+ (NSError *)errorForRegistrationFailure:(TSRegistrationFailure)failureType HTTPStatusCode:(long)HTTPStatus;
+ (NSError*)errorForRegistrationFailure:(TSRegistrationFailure)failureType HTTPStatusCode:(long)HTTPStatus;
+ (void)unregisterTextSecureWithSuccess:(successCompletionBlock)success failure:(failedVerificationBlock)failureBlock;
@end

View File

@ -18,6 +18,7 @@
#import "TSPreKeyManager.h"
#import "TSRegisterForPushRequest.h"
#import "TSRegisterWithTokenRequest.h"
#import "TSUnregisterAccountRequest.h"
@interface TSAccountManager ()
@ -200,5 +201,13 @@
return signalingKeyTokenPrint;
}
+ (void)unregisterTextSecureWithSuccess:(successCompletionBlock)success failure:(failedVerificationBlock)failureBlock{
[[TSNetworkManager sharedManager] queueAuthenticatedRequest:[[TSUnregisterAccountRequest alloc] init] success:^(NSURLSessionDataTask *task, id responseObject) {
success();
} failure:^(NSURLSessionDataTask *task, NSError *error) {
failureBlock(error);
}];
}
@end

View File

@ -8,6 +8,5 @@
#import "TSRequest.h"
@interface TSDeregisterAccountRequest : TSRequest
- (id)initWithUser:(NSString*)user;
@interface TSUnregisterAccountRequest : TSRequest
@end

View File

@ -7,16 +7,14 @@
//
#import "TSConstants.h"
#import "TSDeregisterAccountRequest.h"
#import "TSUnregisterAccountRequest.h"
@implementation TSDeregisterAccountRequest
@implementation TSUnregisterAccountRequest
- (id)initWithUser:(NSString*)userPushId {
- (id)init {
self = [super initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", textSecureAccountsAPI, @"apn"]]];
self.HTTPMethod = @"DELETE";
self.parameters = [NSMutableDictionary dictionaryWithObjects:@[userPushId] forKeys:@[@"apnRegistrationId"]];
return self;
}
@end

View File

@ -8,6 +8,7 @@
#import "TSStorageManager.h"
#import <YapDatabase/YapDatabase.h>
#import <YapDatabase/YapDatabaseRelationship.h>
#import <CocoaLumberjack/DDLog.h>
#import <UICKeyChainStore/UICKeyChainStore.h>
#import "CryptoTools.h"
@ -64,6 +65,7 @@ static NSString * keychainDBPassAccount = @"TSDatabasePass";
- (void)setupDatabase {
[TSDatabaseView registerThreadDatabaseView];
[TSDatabaseView registerBuddyConversationDatabaseView];
[self.database registerExtension:[[YapDatabaseRelationship alloc] init] withName:@"TSRelationships"];
}
/**

View File

@ -139,7 +139,6 @@
SignalsViewController* s = (SignalsViewController*)nav.topViewController;
s.contactIdentifierFromCompose = [[[self contactForIndexPath:indexPath] textSecureIdentifiers] firstObject];
[self dismissViewControllerAnimated:YES completion:^(){
[s performSegueWithIdentifier:@"showSegue" sender:nil];
}];

View File

@ -12,8 +12,8 @@
@class TSThread;
@interface MessagesViewController : JSQMessagesViewController <UIImagePickerControllerDelegate,UINavigationControllerDelegate>
@property TSThread *thread;
- (void)setupWithThread:(TSThread*)thread;
- (void)setupWithTSIdentifier:(NSString*)identifier;
@end

View File

@ -44,6 +44,7 @@ typedef enum : NSUInteger {
BOOL isGroupConversation;
}
@property (nonatomic, retain) TSThread *thread;
@property (nonatomic, strong) YapDatabaseConnection *uiDatabaseConnection;
@property (nonatomic, strong) YapDatabaseViewMappings *messageMappings;
@property (nonatomic, retain) JSQMessagesBubbleImage *outgoingBubbleImageData;
@ -53,6 +54,16 @@ typedef enum : NSUInteger {
@implementation MessagesViewController
- (void)setupWithTSIdentifier:(NSString *)identifier{
[[TSStorageManager sharedManager].newDatabaseConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
self.thread = [TSContactThread threadWithContactId:identifier transaction:transaction];
}];
}
- (void)setupWithThread:(TSThread *)thread{
self.thread = thread;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.

View File

@ -12,18 +12,23 @@
#import "TSAccountManager.h"
#import "RPServerRequestsManager.h"
#import <PastelogKit/Pastelog.h>
#define kProfileCellHeight 87.0f
#define kStandardCellHeight 60.0f
#define kNumberOfSections 2
#define kClearHistoryLogCellRow 4
#define kSendDebugLogCellRow 6
#define kClearHistoryLogCellRow 1
#define kSendDebugLogCellRow 3
#define kUnregisterCell 4
typedef enum {
kProfileRows = 1,
kSecurityRows = 7,
kSecurityRows = 5,
} kRowsForSection;
typedef enum {
@ -39,7 +44,7 @@ typedef enum {
- (void)viewDidLoad {
[super viewDidLoad];
self.tableView.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];
self.registeredNumber.text = [TSAccountManager registeredNumber];
}
@ -105,13 +110,23 @@ typedef enum {
NSLog(@"The user tapped button at index: %li", (long)tappedButtonIndex);
}
}];
break;
}
case kSendDebugLogCellRow:
//Send debug Log
[Pastelog submitLogs];
break;
case kUnregisterCell:
[[RPServerRequestsManager sharedInstance] performRequest:[RPAPICall unregister] success:^(NSURLSessionDataTask *task, id responseObject) {
NSLog(@"YEAH!");
} failure:^(NSURLSessionDataTask *task, NSError *error) {
NSLog(@"Fail");
NSLog(@"error: %@ ", error.debugDescription);
}];
break;
default:
break;
}

View File

@ -150,12 +150,13 @@ static NSString *const kSegueIndentifier = @"showSegue";
if ([segue.identifier isEqualToString:kSegueIndentifier]){
MessagesViewController * vc = [segue destinationViewController];
NSIndexPath *selectedIndexPath = [self.tableView indexPathForSelectedRow];
vc.thread = [self threadForIndexPath:selectedIndexPath];
TSThread *thread = [self threadForIndexPath:selectedIndexPath];
if (!vc.thread) {
[TSStorageManager.sharedManager.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
vc.thread = [TSContactThread threadWithContactId:self.contactIdentifierFromCompose transaction:transaction];
}];
if (thread) {
[vc setupWithThread:thread];
} else if (self.contactIdentifierFromCompose){
[vc setupWithTSIdentifier:self.contactIdentifierFromCompose];
self.contactIdentifierFromCompose = nil;
}
}
}

View File

@ -16,7 +16,6 @@
_contactPictureView.layer.borderColor = [[UIColor lightGrayColor] CGColor];
_contactPictureView.layer.masksToBounds = YES;
self.selectionStyle = UITableViewCellSelectionStyleGray;
_shouldShowContactButtons = YES;
return self;
@ -35,7 +34,6 @@
}
- (void)configureWithContact:(Contact *)contact {
[self showContactButtons:_shouldShowContactButtons];
_associatedContact = contact;
@ -58,7 +56,7 @@
_callButton.imageView.image = [[UIImage imageNamed:@"call_dark"]imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
_callButton.tintColor = [UIColor colorWithRed:0.f/255.f green:122.f/255.f blue:255.f/255.f alpha:1.0f];
} else {
[_callButton addConstraint:[NSLayoutConstraint constraintWithItem:_callButton attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:0 multiplier:1.0f constant:0]];
_callButton.hidden = YES;
}
if (contact.isTextSecureContact && _shouldShowContactButtons)
@ -66,7 +64,7 @@
_messageButton.imageView.image = [[UIImage imageNamed:@"signal"]imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
_messageButton.tintColor = [UIColor colorWithRed:0.f/255.f green:122.f/255.f blue:255.f/255.f alpha:1.0f];
} else {
[_messageButton addConstraint:[NSLayoutConstraint constraintWithItem:_messageButton attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:0 multiplier:1.0f constant:0]];
_messageButton.hidden = YES;
}
}