Closes #589 - Enhancements conversation view.
- Call button should be removed from compose bar (when no text is in the input, or ever). - Attachment options should be Choose from Library..., or Take Photo or Video - Call button should move to right side of nav bar, and be solid white. - Send button in compose bar should be the word Send. - Attachment icon should be paperclip
This commit is contained in:
parent
3112bd9a15
commit
667cc983e9
|
@ -280,6 +280,7 @@
|
|||
A5578C721A646E5300704A25 /* VersionMigrationsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A5578C711A646E5300704A25 /* VersionMigrationsTests.m */; };
|
||||
A56977911A351BC400173BF2 /* ScanIdentityBarcodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A569778E1A351BC400173BF2 /* ScanIdentityBarcodeViewController.m */; };
|
||||
A56977921A351BC400173BF2 /* PresentIdentityQRCodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A569778F1A351BC400173BF2 /* PresentIdentityQRCodeViewController.m */; };
|
||||
A5988A811A8A70D0002AD6BE /* UIButton+OWS.m in Sources */ = {isa = PBXBuildFile; fileRef = A5988A801A8A70D0002AD6BE /* UIButton+OWS.m */; };
|
||||
A59E6D721A79E5D100D98E2E /* MIMETypeUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A59E6D711A79E5D100D98E2E /* MIMETypeUtil.m */; };
|
||||
A5D0699B1A50E9CB004CB540 /* ShowGroupMembersViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A5D069991A50E9CB004CB540 /* ShowGroupMembersViewController.m */; };
|
||||
A5E9D4BB1A65FAD800E4481C /* TSVideoAttachmentAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = A5E9D4B91A65FAD800E4481C /* TSVideoAttachmentAdapter.m */; };
|
||||
|
@ -875,6 +876,8 @@
|
|||
A569778E1A351BC400173BF2 /* ScanIdentityBarcodeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScanIdentityBarcodeViewController.m; sourceTree = "<group>"; };
|
||||
A569778F1A351BC400173BF2 /* PresentIdentityQRCodeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentIdentityQRCodeViewController.m; sourceTree = "<group>"; };
|
||||
A56977901A351BC400173BF2 /* PresentIdentityQRCodeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentIdentityQRCodeViewController.h; sourceTree = "<group>"; };
|
||||
A5988A7F1A8A70D0002AD6BE /* UIButton+OWS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIButton+OWS.h"; path = "util/UIButton+OWS.h"; sourceTree = "<group>"; };
|
||||
A5988A801A8A70D0002AD6BE /* UIButton+OWS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIButton+OWS.m"; path = "util/UIButton+OWS.m"; sourceTree = "<group>"; };
|
||||
A59E6D701A79E5D100D98E2E /* MIMETypeUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MIMETypeUtil.h; sourceTree = "<group>"; };
|
||||
A59E6D711A79E5D100D98E2E /* MIMETypeUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MIMETypeUtil.m; sourceTree = "<group>"; };
|
||||
A5D069991A50E9CB004CB540 /* ShowGroupMembersViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ShowGroupMembersViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
|
||||
|
@ -2721,6 +2724,8 @@
|
|||
FCFA64B11A24F29E0007FB87 /* UI Categories */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A5988A7F1A8A70D0002AD6BE /* UIButton+OWS.h */,
|
||||
A5988A801A8A70D0002AD6BE /* UIButton+OWS.m */,
|
||||
A547DD731A70A87800103EC7 /* DJWActionSheet+OWS.h */,
|
||||
A547DD721A70A87800103EC7 /* DJWActionSheet+OWS.m */,
|
||||
FCFA64B21A24F3880007FB87 /* UIColor+OWS.h */,
|
||||
|
@ -3136,6 +3141,7 @@
|
|||
B62D53F71A23CCAD009AAF82 /* TSMessageAdapter.m in Sources */,
|
||||
B63AF5C91A1F757900D01AAD /* TSRecipientPrekeyRequest.m in Sources */,
|
||||
B63BAD6D1A74DA8F00269E74 /* TSStorageManager+messageIDs.m in Sources */,
|
||||
A5988A811A8A70D0002AD6BE /* UIButton+OWS.m in Sources */,
|
||||
7095B7B018F46D35002C66E2 /* PhoneNumberUtil.m in Sources */,
|
||||
B63AF5D81A1F889500D01AAD /* SubProtocol.pb.m in Sources */,
|
||||
FCD274EB1A5AFDDB00202277 /* AboutTableViewController.m in Sources */,
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -432,7 +432,7 @@
|
|||
</view>
|
||||
<navigationItem key="navigationItem" title="Conversations" id="Um0-0y-8lr">
|
||||
<barButtonItem key="backBarButtonItem" title=" " id="a19-h1-1ZS"/>
|
||||
<barButtonItem key="leftBarButtonItem" image="settings-icon@1x" width="100" style="plain" id="PYj-7F-J24">
|
||||
<barButtonItem key="leftBarButtonItem" image="settings-icon@1x" width="100" id="PYj-7F-J24">
|
||||
<color key="tintColor" red="0.99989169836044312" green="1" blue="0.99988096952438354" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
<segue destination="hxR-Pc-Gxm" kind="showDetail" id="dB4-oM-uSL"/>
|
||||
|
@ -1357,7 +1357,7 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
<view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="J5f-8V-ASm" userLabel="_1.0a Registration Screen Title">
|
||||
<rect key="frame" x="-20" y="-20" width="440" height="284"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" misplaced="YES" image="_1.0a_signal_icon" translatesAutoresizingMaskIntoConstraints="NO" id="vpb-XQ-s2c">
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="_1.0a_signal_icon" translatesAutoresizingMaskIntoConstraints="NO" id="vpb-XQ-s2c">
|
||||
<rect key="frame" x="170" y="88" width="101" height="88"/>
|
||||
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
|
||||
<constraints>
|
||||
|
@ -1386,7 +1386,7 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
</mask>
|
||||
</variation>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="top" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="Your Phone Number" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="50y-cV-8aI">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="top" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your Phone Number" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="50y-cV-8aI">
|
||||
<rect key="frame" x="49" y="188" width="343" height="52"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="223" id="8lm-oa-608"/>
|
||||
|
@ -3003,10 +3003,10 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lIs-Ck-sAt" userLabel="_1.1a Validation Screen Title">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lIs-Ck-sAt" userLabel="_1.1a Validation Screen Title">
|
||||
<rect key="frame" x="-20" y="-20" width="440" height="284"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" misplaced="YES" image="_1.0a_signal_icon" translatesAutoresizingMaskIntoConstraints="NO" id="hW3-07-YNo" userLabel="signal_icon">
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="_1.0a_signal_icon" translatesAutoresizingMaskIntoConstraints="NO" id="hW3-07-YNo" userLabel="signal_icon">
|
||||
<rect key="frame" x="170" y="88" width="101" height="88"/>
|
||||
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
|
||||
<constraints>
|
||||
|
@ -3018,24 +3018,24 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
</constraints>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="a8j-KR-NpB"/>
|
||||
<exclude reference="Wlg-7O-XdE"/>
|
||||
<exclude reference="jlJ-an-IhP"/>
|
||||
<exclude reference="cmg-JE-a0T"/>
|
||||
<exclude reference="6PG-XN-ctl"/>
|
||||
<exclude reference="Wlg-7O-XdE"/>
|
||||
<exclude reference="a8j-KR-NpB"/>
|
||||
<exclude reference="cmg-JE-a0T"/>
|
||||
<exclude reference="jlJ-an-IhP"/>
|
||||
</mask>
|
||||
</variation>
|
||||
<variation key="heightClass=regular-widthClass=compact">
|
||||
<mask key="constraints">
|
||||
<include reference="a8j-KR-NpB"/>
|
||||
<exclude reference="Wlg-7O-XdE"/>
|
||||
<include reference="jlJ-an-IhP"/>
|
||||
<exclude reference="cmg-JE-a0T"/>
|
||||
<exclude reference="6PG-XN-ctl"/>
|
||||
<exclude reference="Wlg-7O-XdE"/>
|
||||
<include reference="a8j-KR-NpB"/>
|
||||
<exclude reference="cmg-JE-a0T"/>
|
||||
<include reference="jlJ-an-IhP"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="top" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="Verification" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e8Y-At-xEK">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="top" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Verification" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e8Y-At-xEK">
|
||||
<rect key="frame" x="49" y="188" width="343" height="52"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="29" id="Mem-ez-9kw"/>
|
||||
|
@ -3046,15 +3046,15 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
<nil key="highlightedColor"/>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="lBf-Vx-2UH"/>
|
||||
<exclude reference="Mem-ez-9kw"/>
|
||||
<exclude reference="lBf-Vx-2UH"/>
|
||||
</mask>
|
||||
</variation>
|
||||
<variation key="heightClass=regular-widthClass=compact">
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="24"/>
|
||||
<mask key="constraints">
|
||||
<exclude reference="lBf-Vx-2UH"/>
|
||||
<include reference="Mem-ez-9kw"/>
|
||||
<exclude reference="lBf-Vx-2UH"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</label>
|
||||
|
@ -3078,12 +3078,12 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
</mask>
|
||||
<mask key="constraints">
|
||||
<exclude reference="5bj-kr-L4s"/>
|
||||
<exclude reference="yE0-ct-KoU"/>
|
||||
<exclude reference="thQ-Jf-aYE"/>
|
||||
<exclude reference="y9O-xU-MkB"/>
|
||||
<exclude reference="yE0-ct-KoU"/>
|
||||
<exclude reference="Dso-vy-b1P"/>
|
||||
<exclude reference="OE3-vm-S0c"/>
|
||||
<exclude reference="bvU-yG-1oi"/>
|
||||
<exclude reference="Dso-vy-b1P"/>
|
||||
</mask>
|
||||
</variation>
|
||||
<variation key="heightClass=regular-widthClass=compact">
|
||||
|
@ -3093,12 +3093,12 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
</mask>
|
||||
<mask key="constraints">
|
||||
<include reference="5bj-kr-L4s"/>
|
||||
<include reference="yE0-ct-KoU"/>
|
||||
<exclude reference="thQ-Jf-aYE"/>
|
||||
<include reference="y9O-xU-MkB"/>
|
||||
<include reference="yE0-ct-KoU"/>
|
||||
<include reference="Dso-vy-b1P"/>
|
||||
<include reference="OE3-vm-S0c"/>
|
||||
<include reference="bvU-yG-1oi"/>
|
||||
<include reference="Dso-vy-b1P"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</view>
|
||||
|
@ -3684,15 +3684,28 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
<exclude reference="UWb-Di-S2f"/>
|
||||
</mask>
|
||||
<mask key="constraints">
|
||||
<exclude reference="3UN-Zb-j14"/>
|
||||
<exclude reference="8Vt-pz-DHH"/>
|
||||
<exclude reference="ppb-ts-aZV"/>
|
||||
<exclude reference="186-I2-PpT"/>
|
||||
<exclude reference="DLn-mq-TQC"/>
|
||||
<exclude reference="TCD-DU-Svm"/>
|
||||
<exclude reference="Yqu-ew-0Ox"/>
|
||||
<exclude reference="j0t-My-vWM"/>
|
||||
<exclude reference="qbD-ea-npC"/>
|
||||
<exclude reference="JCm-AV-mvA"/>
|
||||
<exclude reference="x9N-aq-ABK"/>
|
||||
<exclude reference="JXl-Js-EdT"/>
|
||||
<exclude reference="V1z-SJ-QA5"/>
|
||||
<exclude reference="dqK-wN-Qqd"/>
|
||||
<exclude reference="zDg-Za-jzf"/>
|
||||
<exclude reference="3UN-Zb-j14"/>
|
||||
<exclude reference="8Vt-pz-DHH"/>
|
||||
<exclude reference="ppb-ts-aZV"/>
|
||||
<exclude reference="6Vf-Ko-FBr"/>
|
||||
<exclude reference="JNa-NP-PKr"/>
|
||||
<exclude reference="Weg-Fb-C0D"/>
|
||||
<exclude reference="dJ1-z6-uc7"/>
|
||||
<exclude reference="e8e-kK-ZKM"/>
|
||||
<exclude reference="gln-Vt-qVB"/>
|
||||
<exclude reference="oFo-la-7kN"/>
|
||||
<exclude reference="1PA-ZM-HLt"/>
|
||||
<exclude reference="4Gv-TO-4Gh"/>
|
||||
<exclude reference="7aG-Eg-thY"/>
|
||||
|
@ -3715,19 +3728,6 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
<exclude reference="sQW-xX-kB4"/>
|
||||
<exclude reference="tIc-Lo-cxr"/>
|
||||
<exclude reference="ulI-zy-iTI"/>
|
||||
<exclude reference="6Vf-Ko-FBr"/>
|
||||
<exclude reference="JNa-NP-PKr"/>
|
||||
<exclude reference="Weg-Fb-C0D"/>
|
||||
<exclude reference="dJ1-z6-uc7"/>
|
||||
<exclude reference="e8e-kK-ZKM"/>
|
||||
<exclude reference="gln-Vt-qVB"/>
|
||||
<exclude reference="oFo-la-7kN"/>
|
||||
<exclude reference="JXl-Js-EdT"/>
|
||||
<exclude reference="V1z-SJ-QA5"/>
|
||||
<exclude reference="dqK-wN-Qqd"/>
|
||||
<exclude reference="zDg-Za-jzf"/>
|
||||
<exclude reference="JCm-AV-mvA"/>
|
||||
<exclude reference="x9N-aq-ABK"/>
|
||||
</mask>
|
||||
</variation>
|
||||
<variation key="heightClass=regular-widthClass=compact">
|
||||
|
@ -3737,15 +3737,28 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
<include reference="UWb-Di-S2f"/>
|
||||
</mask>
|
||||
<mask key="constraints">
|
||||
<include reference="3UN-Zb-j14"/>
|
||||
<include reference="8Vt-pz-DHH"/>
|
||||
<include reference="ppb-ts-aZV"/>
|
||||
<include reference="186-I2-PpT"/>
|
||||
<include reference="DLn-mq-TQC"/>
|
||||
<exclude reference="TCD-DU-Svm"/>
|
||||
<include reference="Yqu-ew-0Ox"/>
|
||||
<exclude reference="j0t-My-vWM"/>
|
||||
<exclude reference="qbD-ea-npC"/>
|
||||
<include reference="JCm-AV-mvA"/>
|
||||
<include reference="x9N-aq-ABK"/>
|
||||
<include reference="JXl-Js-EdT"/>
|
||||
<include reference="V1z-SJ-QA5"/>
|
||||
<include reference="dqK-wN-Qqd"/>
|
||||
<include reference="zDg-Za-jzf"/>
|
||||
<include reference="3UN-Zb-j14"/>
|
||||
<include reference="8Vt-pz-DHH"/>
|
||||
<include reference="ppb-ts-aZV"/>
|
||||
<exclude reference="6Vf-Ko-FBr"/>
|
||||
<exclude reference="JNa-NP-PKr"/>
|
||||
<exclude reference="Weg-Fb-C0D"/>
|
||||
<include reference="dJ1-z6-uc7"/>
|
||||
<include reference="e8e-kK-ZKM"/>
|
||||
<include reference="gln-Vt-qVB"/>
|
||||
<exclude reference="oFo-la-7kN"/>
|
||||
<include reference="1PA-ZM-HLt"/>
|
||||
<exclude reference="4Gv-TO-4Gh"/>
|
||||
<exclude reference="7aG-Eg-thY"/>
|
||||
|
@ -3768,19 +3781,6 @@ A0 09 9A FF A8 8A 09 99</string>
|
|||
<exclude reference="sQW-xX-kB4"/>
|
||||
<exclude reference="tIc-Lo-cxr"/>
|
||||
<exclude reference="ulI-zy-iTI"/>
|
||||
<exclude reference="6Vf-Ko-FBr"/>
|
||||
<exclude reference="JNa-NP-PKr"/>
|
||||
<exclude reference="Weg-Fb-C0D"/>
|
||||
<include reference="dJ1-z6-uc7"/>
|
||||
<include reference="e8e-kK-ZKM"/>
|
||||
<include reference="gln-Vt-qVB"/>
|
||||
<exclude reference="oFo-la-7kN"/>
|
||||
<include reference="JXl-Js-EdT"/>
|
||||
<include reference="V1z-SJ-QA5"/>
|
||||
<include reference="dqK-wN-Qqd"/>
|
||||
<include reference="zDg-Za-jzf"/>
|
||||
<include reference="JCm-AV-mvA"/>
|
||||
<include reference="x9N-aq-ABK"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</view>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// UIFont+OWS.h
|
||||
// Signal
|
||||
//
|
||||
// Created by Christine Corbett Moran on 2/10/15.
|
||||
// Copyright (c) 2013 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UIButton (OWS)
|
||||
|
||||
+ (UIButton*) ows_blueButtonWithTitle:(NSString*)title;
|
||||
|
||||
@end
|
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// UIFont+OWS.m
|
||||
// Signal
|
||||
//
|
||||
// Created by Christine Corbett Moran on 2/10/15.
|
||||
// Copyright (c) 2013 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "UIButton+OWS.h"
|
||||
#import "UIFont+OWS.h"
|
||||
#import "UIColor+OWS.h"
|
||||
@implementation UIButton (OWS)
|
||||
|
||||
+ (UIButton*) ows_blueButtonWithTitle:(NSString*)title {
|
||||
NSDictionary* buttonTextAttributes = @{NSFontAttributeName:[UIFont ows_regularFontWithSize:15.0f],
|
||||
NSForegroundColorAttributeName:[UIColor ows_materialBlueColor]};
|
||||
UIButton* button = [[UIButton alloc] init];
|
||||
NSMutableAttributedString *attributedTitle = [[NSMutableAttributedString alloc] initWithString:title];
|
||||
[attributedTitle setAttributes:buttonTextAttributes range:NSMakeRange(0, [attributedTitle length])];
|
||||
[button setAttributedTitle:attributedTitle forState:UIControlStateNormal];
|
||||
[button.titleLabel setTextAlignment:NSTextAlignmentCenter];
|
||||
return button;
|
||||
}
|
||||
|
||||
@end
|
|
@ -36,6 +36,7 @@
|
|||
#import "TSDatabaseView.h"
|
||||
#import "UIColor+OWS.h"
|
||||
#import "UIFont+OWS.h"
|
||||
#import "UIButton+OWS.h"
|
||||
#import <YapDatabase/YapDatabaseView.h>
|
||||
|
||||
|
||||
|
@ -92,7 +93,6 @@ typedef enum : NSUInteger {
|
|||
@property (nonatomic, strong) TSVideoAttachmentAdapter *currentMediaAdapter;
|
||||
|
||||
@property (nonatomic, retain) NSTimer *readTimer;
|
||||
@property (nonatomic, retain) UIButton *callButton;
|
||||
@property (nonatomic, retain) UIButton *messageButton;
|
||||
@property (nonatomic, retain) UIButton *attachButton;
|
||||
|
||||
|
@ -140,11 +140,10 @@ typedef enum : NSUInteger {
|
|||
-(void) hideInputIfNeeded {
|
||||
if([_thread isKindOfClass:[TSGroupThread class]] && ![((TSGroupThread*)_thread).groupModel.groupMemberIds containsObject:[SignalKeyingStorage.localNumber toE164]]) {
|
||||
[self inputToolbar].hidden= YES; // user has requested they leave the group. further sends disallowed
|
||||
self.navigationItem.rightBarButtonItem = nil;
|
||||
self.navigationItem.rightBarButtonItem = nil; // further group action disallowed
|
||||
}
|
||||
else if(![self isTextSecureReachable] ){
|
||||
[self inputToolbar].hidden= YES; // only RedPhone
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"btnPhone--white"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(callAction)];;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,18 +157,7 @@ typedef enum : NSUInteger {
|
|||
_toggleContactPhoneDisplay = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toggleContactPhone)];
|
||||
_toggleContactPhoneDisplay.numberOfTapsRequired = 1;
|
||||
|
||||
_callButton = [[UIButton alloc] init];
|
||||
[_callButton addTarget:self action:@selector(callAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_callButton setFrame:CGRectMake(0, 0, JSQ_TOOLBAR_ICON_WIDTH+JSQ_IMAGE_INSET*2, JSQ_TOOLBAR_ICON_HEIGHT+JSQ_IMAGE_INSET*2)];
|
||||
_callButton.imageEdgeInsets = UIEdgeInsetsMake(JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET);
|
||||
|
||||
[_callButton setImage:[UIImage imageNamed:@"btnPhone--blue"] forState:UIControlStateNormal];
|
||||
|
||||
_messageButton = [[UIButton alloc] init];
|
||||
[_messageButton setFrame:CGRectMake(0, 0, JSQ_TOOLBAR_ICON_WIDTH+JSQ_IMAGE_INSET*2, JSQ_TOOLBAR_ICON_HEIGHT+JSQ_IMAGE_INSET*2)];
|
||||
_messageButton.imageEdgeInsets = UIEdgeInsetsMake(JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET, JSQ_IMAGE_INSET);
|
||||
[_messageButton setImage:[UIImage imageNamed:@"btnSend--blue"] forState:UIControlStateNormal];
|
||||
|
||||
_messageButton = [UIButton ows_blueButtonWithTitle:@"Send"];
|
||||
|
||||
_attachButton = [[UIButton alloc] init];
|
||||
[_attachButton setFrame:CGRectMake(0, 0, JSQ_TOOLBAR_ICON_WIDTH+JSQ_IMAGE_INSET*2, JSQ_TOOLBAR_ICON_HEIGHT+JSQ_IMAGE_INSET*2)];
|
||||
|
@ -210,13 +198,7 @@ typedef enum : NSUInteger {
|
|||
[self.inputToolbar.contentView.textView setFont:[UIFont ows_regularFontWithSize:17.f]];
|
||||
self.inputToolbar.contentView.leftBarButtonItem = _attachButton;
|
||||
|
||||
if([self canCall]) {
|
||||
self.inputToolbar.contentView.rightBarButtonItem = _callButton;
|
||||
self.inputToolbar.contentView.rightBarButtonItem.enabled = YES;
|
||||
}
|
||||
else {
|
||||
self.inputToolbar.contentView.rightBarButtonItem = _messageButton;
|
||||
}
|
||||
self.inputToolbar.contentView.rightBarButtonItem = _messageButton;
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated
|
||||
|
@ -495,10 +477,6 @@ typedef enum : NSUInteger {
|
|||
self.inputToolbar.contentView.rightBarButtonItem = _messageButton;
|
||||
self.inputToolbar.contentView.rightBarButtonItem.enabled = YES;
|
||||
}
|
||||
else if([self canCall]) {
|
||||
self.inputToolbar.contentView.rightBarButtonItem = _callButton;
|
||||
self.inputToolbar.contentView.rightBarButtonItem.enabled = YES;
|
||||
}
|
||||
else {
|
||||
self.inputToolbar.contentView.rightBarButtonItem.enabled = NO;
|
||||
}
|
||||
|
@ -520,10 +498,6 @@ typedef enum : NSUInteger {
|
|||
[[TSMessagesManager sharedManager] sendMessage:message inThread:self.thread];
|
||||
[self finishSendingMessage];
|
||||
}
|
||||
if([self canCall]) {
|
||||
self.inputToolbar.contentView.rightBarButtonItem = _callButton;
|
||||
self.inputToolbar.contentView.rightBarButtonItem.enabled = YES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1078,20 +1052,16 @@ typedef enum : NSUInteger {
|
|||
|
||||
}
|
||||
|
||||
-(void)chooseFromLibrary:(kMediaTypes)mediaType
|
||||
{
|
||||
-(void)chooseFromLibrary {
|
||||
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
|
||||
picker.delegate = self;
|
||||
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
||||
|
||||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
|
||||
{
|
||||
NSArray* pictureTypeArray = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeImage, nil];
|
||||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
|
||||
|
||||
NSArray* videoTypeArray = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeMovie, (NSString*)kUTTypeVideo, nil];
|
||||
|
||||
picker.mediaTypes = (mediaType == kMediaTypePicture) ? pictureTypeArray : videoTypeArray;
|
||||
NSArray* photoOrVideoTypeArray = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeImage,(NSString *)kUTTypeMovie, (NSString*)kUTTypeVideo, nil];
|
||||
|
||||
picker.mediaTypes = photoOrVideoTypeArray;
|
||||
[self presentViewController:picker animated:YES completion:[UIUtil modalCompletionBlock]];
|
||||
}
|
||||
}
|
||||
|
@ -1466,7 +1436,7 @@ typedef enum : NSUInteger {
|
|||
withTitle:nil
|
||||
cancelButtonTitle:@"Cancel"
|
||||
destructiveButtonTitle:nil
|
||||
otherButtonTitles:@[@"Take Photo or Video", @"Choose existing Photo",@"Choose existing Video"]//,@"Record audio"]
|
||||
otherButtonTitles:@[@"Take Photo or Video", @" Choose from Library..."]//,@"Record audio"]
|
||||
tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) {
|
||||
if (tappedButtonIndex == actionSheet.cancelButtonIndex) {
|
||||
DDLogVerbose(@"User Cancelled");
|
||||
|
@ -1478,13 +1448,9 @@ typedef enum : NSUInteger {
|
|||
[self takePictureOrVideo];
|
||||
break;
|
||||
case 1:
|
||||
[self chooseFromLibrary:kMediaTypePicture];
|
||||
[self chooseFromLibrary];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
[self chooseFromLibrary:kMediaTypeVideo];
|
||||
break;
|
||||
case 3:
|
||||
[self recordAudio];
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
adapter.messageBody = @"Placeholder for TSCalls";
|
||||
adapter.messageType = TSCallAdapter;
|
||||
JSQCall *call = [self jsqCallForTSCall:(TSCall*)interaction thread:(TSContactThread*)thread];
|
||||
call.useThumbnail = YES;
|
||||
call.useThumbnail = NO; // disables use of iconography to represent group update actions
|
||||
return call;
|
||||
} else if ([interaction isKindOfClass:[TSInfoMessage class]]){
|
||||
TSInfoMessage * infoMessage = (TSInfoMessage*)interaction;
|
||||
|
@ -147,7 +147,7 @@
|
|||
status = kGroupUpdate;
|
||||
}
|
||||
JSQCall* call = [[JSQCall alloc] initWithCallerId:@"" callerDisplayName:adapter.messageBody date:nil status:status];
|
||||
call.useThumbnail = YES;
|
||||
call.useThumbnail = NO; // disables use of iconography to represent group update actions
|
||||
return call;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue