mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Merge branch 'charlesmchen/renameViews'
This commit is contained in:
commit
daa8c409e3
22 changed files with 243 additions and 264 deletions
|
@ -25,8 +25,8 @@
|
|||
3448BFCC1EDF0EA7005B2D69 /* OWSMessagesToolbarContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3448BFC21EDF0EA7005B2D69 /* OWSMessagesToolbarContentView.m */; };
|
||||
3448BFCD1EDF0EA7005B2D69 /* OWSMessagesInputToolbar.m in Sources */ = {isa = PBXBuildFile; fileRef = 3448BFC41EDF0EA7005B2D69 /* OWSMessagesInputToolbar.m */; };
|
||||
3448BFCF1EDF0EA7005B2D69 /* OWSMessagesComposerTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3448BFC81EDF0EA7005B2D69 /* OWSMessagesComposerTextView.m */; };
|
||||
3448BFD01EDF0EA7005B2D69 /* MessagesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3448BFCA1EDF0EA7005B2D69 /* MessagesViewController.m */; };
|
||||
3448BFD11EDF0EA7005B2D69 /* MessagesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3448BFCB1EDF0EA7005B2D69 /* MessagesViewController.xib */; };
|
||||
3448BFD01EDF0EA7005B2D69 /* ConversationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3448BFCA1EDF0EA7005B2D69 /* ConversationViewController.m */; };
|
||||
3448BFD11EDF0EA7005B2D69 /* ConversationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3448BFCB1EDF0EA7005B2D69 /* ConversationViewController.xib */; };
|
||||
344F2F671E57A932000D9322 /* UIViewController+OWS.m in Sources */ = {isa = PBXBuildFile; fileRef = 344F2F661E57A932000D9322 /* UIViewController+OWS.m */; };
|
||||
34533F181EA8D2070006114F /* OWSAudioAttachmentPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34533F171EA8D2070006114F /* OWSAudioAttachmentPlayer.m */; };
|
||||
34535D821E256BE9008A4747 /* UIView+OWS.m in Sources */ = {isa = PBXBuildFile; fileRef = 34535D811E256BE9008A4747 /* UIView+OWS.m */; };
|
||||
|
@ -54,7 +54,7 @@
|
|||
34B3F87E1E8DF1700035BE1A /* InboxTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F84A1E8DF1700035BE1A /* InboxTableViewCell.m */; };
|
||||
34B3F8801E8DF1700035BE1A /* InviteFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F84C1E8DF1700035BE1A /* InviteFlow.swift */; };
|
||||
34B3F8811E8DF1700035BE1A /* LockInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F84E1E8DF1700035BE1A /* LockInteractionController.m */; };
|
||||
34B3F8821E8DF1700035BE1A /* MessageComposeTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8501E8DF1700035BE1A /* MessageComposeTableViewController.m */; };
|
||||
34B3F8821E8DF1700035BE1A /* NewContactThreadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8501E8DF1700035BE1A /* NewContactThreadViewController.m */; };
|
||||
34B3F8851E8DF1700035BE1A /* NewGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8551E8DF1700035BE1A /* NewGroupViewController.m */; };
|
||||
34B3F8861E8DF1700035BE1A /* NotificationSettingsOptionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8571E8DF1700035BE1A /* NotificationSettingsOptionsViewController.m */; };
|
||||
34B3F8871E8DF1700035BE1A /* NotificationSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8591E8DF1700035BE1A /* NotificationSettingsViewController.m */; };
|
||||
|
@ -70,7 +70,7 @@
|
|||
34B3F8911E8DF1710035BE1A /* ShowGroupMembersViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F86B1E8DF1700035BE1A /* ShowGroupMembersViewController.m */; };
|
||||
34B3F8921E8DF1710035BE1A /* SignalAttachment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F86C1E8DF1700035BE1A /* SignalAttachment.swift */; };
|
||||
34B3F8931E8DF1710035BE1A /* SignalsNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F86E1E8DF1700035BE1A /* SignalsNavigationController.m */; };
|
||||
34B3F8941E8DF1710035BE1A /* SignalsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8701E8DF1700035BE1A /* SignalsViewController.m */; };
|
||||
34B3F8941E8DF1710035BE1A /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8701E8DF1700035BE1A /* HomeViewController.m */; };
|
||||
34B3F8991E8DF1B90035BE1A /* TSMessageAdapterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8981E8DF1B90035BE1A /* TSMessageAdapterTest.m */; };
|
||||
34B3F89C1E8DF3270035BE1A /* BlockListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F89B1E8DF3270035BE1A /* BlockListViewController.m */; };
|
||||
34B3F89F1E8DF5490035BE1A /* OWSTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F89E1E8DF5490035BE1A /* OWSTableViewController.m */; };
|
||||
|
@ -432,9 +432,9 @@
|
|||
3448BFC41EDF0EA7005B2D69 /* OWSMessagesInputToolbar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSMessagesInputToolbar.m; sourceTree = "<group>"; };
|
||||
3448BFC71EDF0EA7005B2D69 /* OWSMessagesComposerTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSMessagesComposerTextView.h; sourceTree = "<group>"; };
|
||||
3448BFC81EDF0EA7005B2D69 /* OWSMessagesComposerTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSMessagesComposerTextView.m; sourceTree = "<group>"; };
|
||||
3448BFC91EDF0EA7005B2D69 /* MessagesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessagesViewController.h; sourceTree = "<group>"; };
|
||||
3448BFCA1EDF0EA7005B2D69 /* MessagesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessagesViewController.m; sourceTree = "<group>"; };
|
||||
3448BFCB1EDF0EA7005B2D69 /* MessagesViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MessagesViewController.xib; sourceTree = "<group>"; };
|
||||
3448BFC91EDF0EA7005B2D69 /* ConversationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConversationViewController.h; sourceTree = "<group>"; };
|
||||
3448BFCA1EDF0EA7005B2D69 /* ConversationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConversationViewController.m; sourceTree = "<group>"; };
|
||||
3448BFCB1EDF0EA7005B2D69 /* ConversationViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConversationViewController.xib; sourceTree = "<group>"; };
|
||||
344F2F651E57A932000D9322 /* UIViewController+OWS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+OWS.h"; path = "util/UIViewController+OWS.h"; sourceTree = "<group>"; };
|
||||
344F2F661E57A932000D9322 /* UIViewController+OWS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+OWS.m"; path = "util/UIViewController+OWS.m"; sourceTree = "<group>"; };
|
||||
34533F161EA8D2070006114F /* OWSAudioAttachmentPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSAudioAttachmentPlayer.h; sourceTree = "<group>"; };
|
||||
|
@ -481,8 +481,8 @@
|
|||
34B3F84C1E8DF1700035BE1A /* InviteFlow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InviteFlow.swift; sourceTree = "<group>"; };
|
||||
34B3F84D1E8DF1700035BE1A /* LockInteractionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LockInteractionController.h; sourceTree = "<group>"; };
|
||||
34B3F84E1E8DF1700035BE1A /* LockInteractionController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LockInteractionController.m; sourceTree = "<group>"; };
|
||||
34B3F84F1E8DF1700035BE1A /* MessageComposeTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageComposeTableViewController.h; sourceTree = "<group>"; };
|
||||
34B3F8501E8DF1700035BE1A /* MessageComposeTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageComposeTableViewController.m; sourceTree = "<group>"; };
|
||||
34B3F84F1E8DF1700035BE1A /* NewContactThreadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewContactThreadViewController.h; sourceTree = "<group>"; };
|
||||
34B3F8501E8DF1700035BE1A /* NewContactThreadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewContactThreadViewController.m; sourceTree = "<group>"; };
|
||||
34B3F8541E8DF1700035BE1A /* NewGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewGroupViewController.h; sourceTree = "<group>"; };
|
||||
34B3F8551E8DF1700035BE1A /* NewGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewGroupViewController.m; sourceTree = "<group>"; };
|
||||
34B3F8561E8DF1700035BE1A /* NotificationSettingsOptionsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotificationSettingsOptionsViewController.h; sourceTree = "<group>"; };
|
||||
|
@ -510,8 +510,8 @@
|
|||
34B3F86C1E8DF1700035BE1A /* SignalAttachment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignalAttachment.swift; sourceTree = "<group>"; };
|
||||
34B3F86D1E8DF1700035BE1A /* SignalsNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SignalsNavigationController.h; sourceTree = "<group>"; };
|
||||
34B3F86E1E8DF1700035BE1A /* SignalsNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SignalsNavigationController.m; sourceTree = "<group>"; };
|
||||
34B3F86F1E8DF1700035BE1A /* SignalsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SignalsViewController.h; sourceTree = "<group>"; };
|
||||
34B3F8701E8DF1700035BE1A /* SignalsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SignalsViewController.m; sourceTree = "<group>"; };
|
||||
34B3F86F1E8DF1700035BE1A /* HomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeViewController.h; sourceTree = "<group>"; };
|
||||
34B3F8701E8DF1700035BE1A /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; };
|
||||
34B3F8981E8DF1B90035BE1A /* TSMessageAdapterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSMessageAdapterTest.m; sourceTree = "<group>"; };
|
||||
34B3F89A1E8DF3270035BE1A /* BlockListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockListViewController.h; sourceTree = "<group>"; };
|
||||
34B3F89B1E8DF3270035BE1A /* BlockListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BlockListViewController.m; sourceTree = "<group>"; };
|
||||
|
@ -966,9 +966,9 @@
|
|||
3448BFC01EDF0EA7005B2D69 /* ConversationView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3448BFC91EDF0EA7005B2D69 /* MessagesViewController.h */,
|
||||
3448BFCA1EDF0EA7005B2D69 /* MessagesViewController.m */,
|
||||
3448BFCB1EDF0EA7005B2D69 /* MessagesViewController.xib */,
|
||||
3448BFC91EDF0EA7005B2D69 /* ConversationViewController.h */,
|
||||
3448BFCA1EDF0EA7005B2D69 /* ConversationViewController.m */,
|
||||
3448BFCB1EDF0EA7005B2D69 /* ConversationViewController.xib */,
|
||||
3448BFC71EDF0EA7005B2D69 /* OWSMessagesComposerTextView.h */,
|
||||
3448BFC81EDF0EA7005B2D69 /* OWSMessagesComposerTextView.m */,
|
||||
3448BFC31EDF0EA7005B2D69 /* OWSMessagesInputToolbar.h */,
|
||||
|
@ -1022,13 +1022,15 @@
|
|||
34E8BF371EE9E2FD00F5F4CA /* FingerprintViewScanController.m */,
|
||||
34B3F8471E8DF1700035BE1A /* FullImageViewController.h */,
|
||||
34B3F8481E8DF1700035BE1A /* FullImageViewController.m */,
|
||||
34B3F86F1E8DF1700035BE1A /* HomeViewController.h */,
|
||||
34B3F8701E8DF1700035BE1A /* HomeViewController.m */,
|
||||
34B3F8491E8DF1700035BE1A /* InboxTableViewCell.h */,
|
||||
34B3F84A1E8DF1700035BE1A /* InboxTableViewCell.m */,
|
||||
34B3F84C1E8DF1700035BE1A /* InviteFlow.swift */,
|
||||
34B3F84D1E8DF1700035BE1A /* LockInteractionController.h */,
|
||||
34B3F84E1E8DF1700035BE1A /* LockInteractionController.m */,
|
||||
34B3F84F1E8DF1700035BE1A /* MessageComposeTableViewController.h */,
|
||||
34B3F8501E8DF1700035BE1A /* MessageComposeTableViewController.m */,
|
||||
34B3F84F1E8DF1700035BE1A /* NewContactThreadViewController.h */,
|
||||
34B3F8501E8DF1700035BE1A /* NewContactThreadViewController.m */,
|
||||
34B3F8541E8DF1700035BE1A /* NewGroupViewController.h */,
|
||||
34B3F8551E8DF1700035BE1A /* NewGroupViewController.m */,
|
||||
3471B1D81EB7C63600F6AEC8 /* NewNonContactConversationViewController.h */,
|
||||
|
@ -1078,8 +1080,6 @@
|
|||
34B3F86C1E8DF1700035BE1A /* SignalAttachment.swift */,
|
||||
34B3F86D1E8DF1700035BE1A /* SignalsNavigationController.h */,
|
||||
34B3F86E1E8DF1700035BE1A /* SignalsNavigationController.m */,
|
||||
34B3F86F1E8DF1700035BE1A /* SignalsViewController.h */,
|
||||
34B3F8701E8DF1700035BE1A /* SignalsViewController.m */,
|
||||
3400C7971EAFB772008A8584 /* ThreadViewHelper.h */,
|
||||
3400C7981EAFB772008A8584 /* ThreadViewHelper.m */,
|
||||
340CB2251EAC25820001CAA1 /* UpdateGroupViewController.h */,
|
||||
|
@ -1995,7 +1995,7 @@
|
|||
B633C59D1A1D190B0059AC12 /* endcall@2x.png in Resources */,
|
||||
FC5CDF391A3393DD00B47253 /* error_white@2x.png in Resources */,
|
||||
B633C5D21A1D190B0059AC12 /* savephoto@2x.png in Resources */,
|
||||
3448BFD11EDF0EA7005B2D69 /* MessagesViewController.xib in Resources */,
|
||||
3448BFD11EDF0EA7005B2D69 /* ConversationViewController.xib in Resources */,
|
||||
B10C9B611A7049EC00ECA2BF /* play_icon.png in Resources */,
|
||||
AD83FF401A73426500B5C81A /* audio_pause_button_blue@2x.png in Resources */,
|
||||
B66DBF4A19D5BBC8006EA940 /* Images.xcassets in Resources */,
|
||||
|
@ -2329,7 +2329,7 @@
|
|||
34B3F8851E8DF1700035BE1A /* NewGroupViewController.m in Sources */,
|
||||
B6C93C4E199567AD00EDF894 /* DebugLogger.m in Sources */,
|
||||
34D8C0271ED3673300188D7C /* DebugUIMessages.m in Sources */,
|
||||
34B3F8821E8DF1700035BE1A /* MessageComposeTableViewController.m in Sources */,
|
||||
34B3F8821E8DF1700035BE1A /* NewContactThreadViewController.m in Sources */,
|
||||
3453D8EA1EC0D4ED003F9E6F /* OWSAlerts.swift in Sources */,
|
||||
45F659821E1BE77000444429 /* NonCallKitCallUIAdaptee.swift in Sources */,
|
||||
45AE48511E0732D6004D96C2 /* TurnServerInfo.swift in Sources */,
|
||||
|
@ -2348,7 +2348,7 @@
|
|||
34B3F88D1E8DF1700035BE1A /* OWSQRCodeScanningViewController.m in Sources */,
|
||||
34B3F8811E8DF1700035BE1A /* LockInteractionController.m in Sources */,
|
||||
3448BFCC1EDF0EA7005B2D69 /* OWSMessagesToolbarContentView.m in Sources */,
|
||||
3448BFD01EDF0EA7005B2D69 /* MessagesViewController.m in Sources */,
|
||||
3448BFD01EDF0EA7005B2D69 /* ConversationViewController.m in Sources */,
|
||||
34CCAF3B1F0C2748004084F4 /* OWSAddToContactViewController.m in Sources */,
|
||||
45F659731E1BD99C00444429 /* CallKitCallUIAdaptee.swift in Sources */,
|
||||
45BB93381E688E14001E3939 /* UIDevice+featureSupport.swift in Sources */,
|
||||
|
@ -2388,7 +2388,7 @@
|
|||
4579431E1E7C8CE9008ED0C0 /* Pastelog.m in Sources */,
|
||||
34D99C941F2937CC00D284D6 /* OWSSwiftUtils.swift in Sources */,
|
||||
34C42D661F4734ED0072EC04 /* OWSContactOffersInteraction.m in Sources */,
|
||||
34B3F8941E8DF1710035BE1A /* SignalsViewController.m in Sources */,
|
||||
34B3F8941E8DF1710035BE1A /* HomeViewController.m in Sources */,
|
||||
34E8BF381EE9E2FD00F5F4CA /* FingerprintViewScanController.m in Sources */,
|
||||
346B66311F4E29B200E5122F /* CropScaleImageViewController.swift in Sources */,
|
||||
76EB058818170B33006006FC /* PropertyListPreferences.m in Sources */,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "SignalsViewController.h"
|
||||
#import "HomeViewController.h"
|
||||
|
||||
extern NSString *const AppDelegateStoryboardMain;
|
||||
|
||||
|
|
|
@ -801,7 +801,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
|
|||
DDLogInfo(@"Presenting initial root view controller");
|
||||
|
||||
if ([TSAccountManager isRegistered]) {
|
||||
SignalsViewController *homeView = [SignalsViewController new];
|
||||
HomeViewController *homeView = [HomeViewController new];
|
||||
SignalsNavigationController *navigationController =
|
||||
[[SignalsNavigationController alloc] initWithRootViewController:homeView];
|
||||
self.window.rootViewController = navigationController;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#import "Environment.h"
|
||||
#import "FLAnimatedImage.h"
|
||||
#import "FingerprintViewController.h"
|
||||
#import "HomeViewController.h"
|
||||
#import "NotificationsManager.h"
|
||||
#import "OWSAnyTouchGestureRecognizer.h"
|
||||
#import "OWSAudioAttachmentPlayer.h"
|
||||
|
@ -29,7 +30,6 @@
|
|||
#import "PropertyListPreferences.h"
|
||||
#import "PushManager.h"
|
||||
#import "Release.h"
|
||||
#import "SignalsViewController.h"
|
||||
#import "TSMessageAdapter.h"
|
||||
#import "UIColor+OWS.h"
|
||||
#import "UIFont+OWS.h"
|
||||
|
|
|
@ -1,65 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--MessagesVC-->
|
||||
<scene sceneID="QqV-z2-xRW">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="MessagesViewController" title="MessagesVC" hidesBottomBarWhenPushed="YES" id="DtA-8O-wrT" customClass="MessagesViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="0di-ZU-w1m"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="stV-ob-KSQ"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="5r3-kq-bbI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" title="Title" id="mLN-DG-4IU">
|
||||
<barButtonItem key="backBarButtonItem" title=" " id="wnY-V7-zmi"/>
|
||||
<barButtonItem key="rightBarButtonItem" image="contact-options-action" id="662-pN-RLf">
|
||||
<inset key="imageInsets" minX="17" minY="10" maxX="0.0" maxY="5"/>
|
||||
<color key="tintColor" red="0.99987119436264038" green="0.99998223781585693" blue="0.99984109401702881" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
<connections>
|
||||
<outlet property="inputToolbar" destination="BdJ-vY-dHA" id="EfK-zI-nSM"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="yXZ-iE-5va" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="BdJ-vY-dHA" customClass="OWSMessagesInputToolbar">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<items>
|
||||
<barButtonItem title="Item" id="4F3-az-L9s"/>
|
||||
</items>
|
||||
</toolbar>
|
||||
<view contentMode="scaleToFill" id="X6H-b7-xZK" customClass="OWSMessagesToolbarContentView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<connections>
|
||||
<outlet property="textView" destination="XUl-oy-JS1" id="kzd-TM-IJT"/>
|
||||
</connections>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="XUl-oy-JS1" customClass="JSQMessagesComposerTextView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-2287" y="-1516"/>
|
||||
</scene>
|
||||
<!--Linked Devices-->
|
||||
<scene sceneID="R59-ey-Ucx">
|
||||
<objects>
|
||||
|
@ -262,7 +214,6 @@
|
|||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="contact-options-action" width="44" height="44"/>
|
||||
<image name="ic_devices_ios" width="180" height="119"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
@class TSThread;
|
||||
|
||||
extern NSString *const OWSMessagesViewControllerDidAppearNotification;
|
||||
extern NSString *const ConversationViewControllerDidAppearNotification;
|
||||
|
||||
@interface MessagesViewController : JSQMessagesViewController
|
||||
@interface ConversationViewController : JSQMessagesViewController
|
||||
|
||||
@property (nonatomic, readonly) TSThread *thread;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MessagesViewController.h"
|
||||
#import "ConversationViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "AttachmentSharing.h"
|
||||
#import "BlockListUIUtils.h"
|
||||
|
@ -106,7 +106,7 @@ static const int JSQ_IMAGE_INSET = 5;
|
|||
|
||||
static NSTimeInterval const kTSMessageSentDateShowTimeInterval = 5 * kMinuteInterval;
|
||||
|
||||
NSString *const OWSMessagesViewControllerDidAppearNotification = @"OWSMessagesViewControllerDidAppear";
|
||||
NSString *const ConversationViewControllerDidAppearNotification = @"ConversationViewControllerDidAppear";
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
kMediaTypePicture,
|
||||
|
@ -154,7 +154,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
|
||||
#pragma mark -
|
||||
|
||||
@interface MessagesViewController () <AVAudioPlayerDelegate,
|
||||
@interface ConversationViewController () <AVAudioPlayerDelegate,
|
||||
ContactsViewHelperDelegate,
|
||||
ContactEditingDelegate,
|
||||
CNContactViewControllerDelegate,
|
||||
|
@ -252,7 +252,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
|
||||
#pragma mark -
|
||||
|
||||
@implementation MessagesViewController
|
||||
@implementation ConversationViewController
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
|
@ -669,7 +669,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
[self startExpirationTimerAnimations];
|
||||
|
||||
// We should have already requested contact access at this point, so this should be a no-op
|
||||
// unless it ever becomes possible to load this VC without going via the SignalsViewController.
|
||||
// unless it ever becomes possible to load this VC without going via the HomeViewController.
|
||||
[self.contactsManager requestSystemContactsOnce];
|
||||
|
||||
OWSDisappearingMessagesConfiguration *configuration =
|
||||
|
@ -979,7 +979,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
|
||||
__weak MessagesViewController *weakSelf = self;
|
||||
__weak ConversationViewController *weakSelf = self;
|
||||
UIAlertAction *verifyAction = [UIAlertAction
|
||||
actionWithTitle:(hasMultiple ? NSLocalizedString(@"VERIFY_PRIVACY_MULTIPLE",
|
||||
@"Label for button or row which allows users to verify the safety "
|
||||
|
@ -1145,7 +1145,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
|
||||
- (void)startExpirationTimerAnimations
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:OWSMessagesViewControllerDidAppearNotification
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ConversationViewControllerDidAppearNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
|
@ -1517,7 +1517,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
return;
|
||||
}
|
||||
|
||||
__weak MessagesViewController *weakSelf = self;
|
||||
__weak ConversationViewController *weakSelf = self;
|
||||
if ([self isBlockedContactConversation]) {
|
||||
[self showUnblockContactUI:^(BOOL isBlocked) {
|
||||
if (!isBlocked) {
|
||||
|
@ -1571,7 +1571,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
updateKeyboardState:(BOOL)updateKeyboardState
|
||||
{
|
||||
|
||||
__weak MessagesViewController *weakSelf = self;
|
||||
__weak ConversationViewController *weakSelf = self;
|
||||
if ([self isBlockedContactConversation]) {
|
||||
[self showUnblockContactUI:^(BOOL isBlocked) {
|
||||
if (!isBlocked) {
|
||||
|
@ -2737,15 +2737,15 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
}];
|
||||
[actionSheetController addAction:showSafteyNumberAction];
|
||||
|
||||
UIAlertAction *acceptSafetyNumberAction = [UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"ACCEPT_NEW_IDENTITY_ACTION", @"Action sheet item")
|
||||
UIAlertAction *acceptSafetyNumberAction =
|
||||
[UIAlertAction actionWithTitle:NSLocalizedString(@"ACCEPT_NEW_IDENTITY_ACTION", @"Action sheet item")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *_Nonnull action) {
|
||||
DDLogInfo(@"%@ Remote Key Changed actions: Accepted new identity key", self.tag);
|
||||
|
||||
// DEPRECATED: we're no longer creating these incoming SN error's per message,
|
||||
// but there will be some legacy ones in the wild, behind which await as-of-yet-undecrypted
|
||||
// messages
|
||||
// but there will be some legacy ones in the wild, behind which await
|
||||
// as-of-yet-undecrypted messages
|
||||
if ([errorMessage isKindOfClass:[TSInvalidIdentityKeyReceivingErrorMessage class]]) {
|
||||
[errorMessage acceptNewIdentityKey];
|
||||
}
|
||||
|
@ -2772,7 +2772,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
message:[NSString stringWithFormat:[CallStrings callBackAlertMessageFormat], displayName]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
__weak MessagesViewController *weakSelf = self;
|
||||
__weak ConversationViewController *weakSelf = self;
|
||||
UIAlertAction *callAction = [UIAlertAction actionWithTitle:[CallStrings callBackAlertCallButton]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *_Nonnull action) {
|
||||
|
@ -2808,16 +2808,15 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
|
||||
[actionSheetController addAction:[OWSAlerts cancelAction]];
|
||||
|
||||
UIAlertAction *blockAction =
|
||||
[UIAlertAction actionWithTitle:NSLocalizedString(@"BLOCK_OFFER_ACTIONSHEET_BLOCK_ACTION",
|
||||
@"Action sheet that will block an unknown user.")
|
||||
UIAlertAction *blockAction = [UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(
|
||||
@"BLOCK_OFFER_ACTIONSHEET_BLOCK_ACTION", @"Action sheet that will block an unknown user.")
|
||||
style:UIAlertActionStyleDestructive
|
||||
handler:^(UIAlertAction *_Nonnull action) {
|
||||
DDLogInfo(@"%@ Blocking an unknown user.", self.tag);
|
||||
[self.blockingManager addBlockedPhoneNumber:interaction.recipientId];
|
||||
// Delete the offers.
|
||||
[self.editingDatabaseConnection
|
||||
readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
[self.editingDatabaseConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
contactThread.hasDismissedOffers = YES;
|
||||
[contactThread saveWithTransaction:transaction];
|
||||
[interaction removeWithTransaction:transaction];
|
||||
|
@ -3507,8 +3506,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
|
||||
NSArray *messageRowChanges = nil;
|
||||
NSArray *sectionChanges = nil;
|
||||
[[self.uiDatabaseConnection ext:TSMessageDatabaseViewExtensionName]
|
||||
getSectionChanges:§ionChanges
|
||||
[[self.uiDatabaseConnection ext:TSMessageDatabaseViewExtensionName] getSectionChanges:§ionChanges
|
||||
rowChanges:&messageRowChanges
|
||||
forNotifications:notifications
|
||||
withMappings:self.messageMappings];
|
||||
|
@ -3860,7 +3858,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
- (void)didPressAccessoryButton:(UIButton *)sender
|
||||
{
|
||||
|
||||
__weak MessagesViewController *weakSelf = self;
|
||||
__weak ConversationViewController *weakSelf = self;
|
||||
if ([self isBlockedContactConversation]) {
|
||||
[self showUnblockContactUI:^(BOOL isBlocked) {
|
||||
if (!isBlocked) {
|
||||
|
@ -4130,7 +4128,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
|
||||
// Max out the unread count at 99+.
|
||||
const NSUInteger kMaxUnreadCount = 99;
|
||||
_backButtonUnreadCountLabel.text = [ViewControllerUtils formatInt:(int) MIN(kMaxUnreadCount, unreadCount)];
|
||||
_backButtonUnreadCountLabel.text = [ViewControllerUtils formatInt:(int)MIN(kMaxUnreadCount, unreadCount)];
|
||||
}
|
||||
|
||||
#pragma mark 3D Touch Preview Actions
|
||||
|
@ -4185,7 +4183,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
DDLogError(@"%@ %s", self.tag, __PRETTY_FUNCTION__);
|
||||
|
||||
DispatchMainThreadSafe(^{
|
||||
__weak MessagesViewController *weakSelf = self;
|
||||
__weak ConversationViewController *weakSelf = self;
|
||||
if ([self isBlockedContactConversation]) {
|
||||
[self showUnblockContactUI:^(BOOL isBlocked) {
|
||||
if (!isBlocked) {
|
||||
|
@ -4540,14 +4538,14 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
|
||||
+ (UINib *)nib
|
||||
{
|
||||
return [UINib nibWithNibName:NSStringFromClass([MessagesViewController class])
|
||||
bundle:[NSBundle bundleForClass:[MessagesViewController class]]];
|
||||
return [UINib nibWithNibName:NSStringFromClass([ConversationViewController class])
|
||||
bundle:[NSBundle bundleForClass:[ConversationViewController class]]];
|
||||
}
|
||||
|
||||
+ (instancetype)messagesViewController
|
||||
{
|
||||
return [[[self class] alloc] initWithNibName:NSStringFromClass([MessagesViewController class])
|
||||
bundle:[NSBundle bundleForClass:[MessagesViewController class]]];
|
||||
return [[[self class] alloc] initWithNibName:NSStringFromClass([ConversationViewController class])
|
||||
bundle:[NSBundle bundleForClass:[ConversationViewController class]]];
|
||||
}
|
||||
|
||||
#pragma mark - Logging
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1217" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
|
@ -83,7 +83,7 @@ private class IntroductingProfilesExperienceUpgradeViewController: ExperienceUpg
|
|||
|
||||
// dismiss the modally presented view controller, then proceed.
|
||||
experienceUpgradesPageViewController.dismiss(animated: true) {
|
||||
guard let fromViewController = UIApplication.shared.frontmostViewController as? SignalsViewController else {
|
||||
guard let fromViewController = UIApplication.shared.frontmostViewController as? HomeViewController else {
|
||||
owsFail("unexpected frontmostViewController: \(String(describing: UIApplication.shared.frontmostViewController))")
|
||||
return
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
@class TSThread;
|
||||
|
||||
@interface SignalsViewController : OWSViewController
|
||||
@interface HomeViewController : OWSViewController
|
||||
|
||||
// TODO: Remove this property.
|
||||
@property (nonatomic) BOOL newlyRegisteredUser;
|
|
@ -2,13 +2,13 @@
|
|||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SignalsViewController.h"
|
||||
#import "HomeViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "AppSettingsViewController.h"
|
||||
#import "ConversationViewController.h"
|
||||
#import "InboxTableViewCell.h"
|
||||
#import "MessageComposeTableViewController.h"
|
||||
#import "MessagesViewController.h"
|
||||
#import "NSDate+millisecondTimeStamp.h"
|
||||
#import "NewContactThreadViewController.h"
|
||||
#import "OWSContactsManager.h"
|
||||
#import "OWSNavigationController.h"
|
||||
#import "ProfileViewController.h"
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
||||
|
||||
@interface SignalsViewController () <UITableViewDelegate, UITableViewDataSource, UIViewControllerPreviewingDelegate>
|
||||
@interface HomeViewController () <UITableViewDelegate, UITableViewDataSource, UIViewControllerPreviewingDelegate>
|
||||
|
||||
@property (nonatomic) UITableView *tableView;
|
||||
@property (nonatomic) UILabel *emptyBoxLabel;
|
||||
|
@ -74,7 +74,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
|
||||
#pragma mark -
|
||||
|
||||
@implementation SignalsViewController
|
||||
@implementation HomeViewController
|
||||
|
||||
#pragma mark - Init
|
||||
|
||||
|
@ -169,7 +169,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
// TODO: Remove this.
|
||||
[[Environment getCurrent] setSignalsViewController:self];
|
||||
[[Environment getCurrent] setHomeViewController:self];
|
||||
|
||||
self.navigationItem.rightBarButtonItem =
|
||||
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose
|
||||
|
@ -179,7 +179,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
ReminderView *archiveReminderView = [ReminderView new];
|
||||
archiveReminderView.text = NSLocalizedString(
|
||||
@"INBOX_VIEW_ARCHIVE_MODE_REMINDER", @"Label reminding the user that they are in archive mode.");
|
||||
__weak SignalsViewController *weakSelf = self;
|
||||
__weak HomeViewController *weakSelf = self;
|
||||
archiveReminderView.tapAction = ^{
|
||||
[weakSelf showInboxGrouping];
|
||||
};
|
||||
|
@ -236,7 +236,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
[self.view layoutSubviews];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
[self.navigationController.navigationBar setTranslucent:NO];
|
||||
|
||||
|
@ -263,18 +264,19 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
UINavigationItem *navigationItem = self.navigationItem;
|
||||
navigationItem.titleView = self.segmentedControl;
|
||||
[self.segmentedControl setSelectedSegmentIndex:0];
|
||||
navigationItem.leftBarButtonItem.accessibilityLabel = NSLocalizedString(
|
||||
@"SETTINGS_BUTTON_ACCESSIBILITY", @"Accessibility hint for the settings button");
|
||||
navigationItem.leftBarButtonItem.accessibilityLabel
|
||||
= NSLocalizedString(@"SETTINGS_BUTTON_ACCESSIBILITY", @"Accessibility hint for the settings button");
|
||||
|
||||
if ([self.traitCollection respondsToSelector:@selector(forceTouchCapability)] &&
|
||||
(self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable)) {
|
||||
if ([self.traitCollection respondsToSelector:@selector(forceTouchCapability)]
|
||||
&& (self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable)) {
|
||||
[self registerForPreviewingWithDelegate:self sourceView:self.tableView];
|
||||
}
|
||||
|
||||
[self updateBarButtonItems];
|
||||
}
|
||||
|
||||
- (void)updateBarButtonItems {
|
||||
- (void)updateBarButtonItems
|
||||
{
|
||||
const CGFloat kBarButtonSize = 44;
|
||||
// We use UIButtons with [UIBarButtonItem initWithCustomView:...] instead of
|
||||
// UIBarButtonItem in order to ensure that these buttons are spaced tightly.
|
||||
|
@ -309,20 +311,22 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
|
||||
}
|
||||
|
||||
- (void)settingsButtonPressed:(id)sender {
|
||||
- (void)settingsButtonPressed:(id)sender
|
||||
{
|
||||
AppSettingsViewController *vc = [AppSettingsViewController new];
|
||||
OWSNavigationController *navigationController = [[OWSNavigationController alloc] initWithRootViewController:vc];
|
||||
[self presentViewController:navigationController animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (UIViewController *)previewingContext:(id<UIViewControllerPreviewing>)previewingContext
|
||||
viewControllerForLocation:(CGPoint)location {
|
||||
viewControllerForLocation:(CGPoint)location
|
||||
{
|
||||
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:location];
|
||||
|
||||
if (indexPath) {
|
||||
[previewingContext setSourceRect:[self.tableView rectForRowAtIndexPath:indexPath]];
|
||||
|
||||
MessagesViewController *vc = [MessagesViewController new];
|
||||
ConversationViewController *vc = [ConversationViewController new];
|
||||
TSThread *thread = [self threadForIndexPath:indexPath];
|
||||
self.lastThread = thread;
|
||||
[vc configureForThread:thread keyboardOnViewAppearing:NO callOnViewAppearing:NO];
|
||||
|
@ -335,8 +339,9 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
}
|
||||
|
||||
- (void)previewingContext:(id<UIViewControllerPreviewing>)previewingContext
|
||||
commitViewController:(UIViewController *)viewControllerToCommit {
|
||||
MessagesViewController *vc = (MessagesViewController *)viewControllerToCommit;
|
||||
commitViewController:(UIViewController *)viewControllerToCommit
|
||||
{
|
||||
ConversationViewController *vc = (ConversationViewController *)viewControllerToCommit;
|
||||
[vc popped];
|
||||
|
||||
[self.navigationController pushViewController:vc animated:NO];
|
||||
|
@ -344,7 +349,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
|
||||
- (void)composeNew
|
||||
{
|
||||
MessageComposeTableViewController *viewController = [MessageComposeTableViewController new];
|
||||
NewContactThreadViewController *viewController = [NewContactThreadViewController new];
|
||||
|
||||
[self.contactsManager requestSystemContactsOnceWithCompletion:^(NSError *_Nullable error) {
|
||||
if (error) {
|
||||
|
@ -361,7 +366,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
}];
|
||||
}
|
||||
|
||||
- (void)swappedSegmentedControl {
|
||||
- (void)swappedSegmentedControl
|
||||
{
|
||||
if (self.segmentedControl.selectedSegmentIndex == 0) {
|
||||
[self showInboxGrouping];
|
||||
} else {
|
||||
|
@ -369,7 +375,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
}
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
if ([TSThread numberOfKeysInCollection] > 0) {
|
||||
[self.contactsManager requestSystemContactsOnceWithCompletion:^(NSError *_Nullable error) {
|
||||
|
@ -482,11 +489,12 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
self.isAppInBackground = YES;
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
if (self.newlyRegisteredUser) {
|
||||
[self.editingDbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction * _Nonnull transaction) {
|
||||
[self.editingDbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
|
||||
[self.experienceUpgradeFinder markAllAsSeenWithTransaction:transaction];
|
||||
}];
|
||||
// Start running the disappearing messages job in case the newly registered user
|
||||
|
@ -528,7 +536,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
NSArray<ExperienceUpgrade *> *unseenUpgrades = [self unseenUpgradeExperiences];
|
||||
|
||||
if (unseenUpgrades.count > 0) {
|
||||
ExperienceUpgradesPageViewController *experienceUpgradeViewController = [[ExperienceUpgradesPageViewController alloc] initWithExperienceUpgrades:unseenUpgrades];
|
||||
ExperienceUpgradesPageViewController *experienceUpgradeViewController =
|
||||
[[ExperienceUpgradesPageViewController alloc] initWithExperienceUpgrades:unseenUpgrades];
|
||||
[self presentViewController:experienceUpgradeViewController
|
||||
animated:YES
|
||||
completion:^{
|
||||
|
@ -541,7 +550,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
self.hasBeenPresented = YES;
|
||||
}
|
||||
|
||||
- (void)tableViewSetUp {
|
||||
- (void)tableViewSetUp
|
||||
{
|
||||
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
}
|
||||
|
||||
|
@ -561,7 +571,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
return (NSInteger)[self.threadMappings numberOfSections];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return (NSInteger)[self.threadMappings numberOfItemsInSection:(NSUInteger)section];
|
||||
}
|
||||
|
||||
|
@ -582,7 +593,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
return cell;
|
||||
}
|
||||
|
||||
- (TSThread *)threadForIndexPath:(NSIndexPath *)indexPath {
|
||||
- (TSThread *)threadForIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
__block TSThread *thread = nil;
|
||||
[self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
|
||||
thread = [[transaction extension:TSThreadDatabaseViewExtensionName] objectAtIndexPath:indexPath
|
||||
|
@ -592,7 +604,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
return thread;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return InboxTableViewCell.rowHeight;
|
||||
}
|
||||
|
||||
|
@ -600,12 +613,14 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
|
||||
- (void)tableView:(UITableView *)tableView
|
||||
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
|
||||
forRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
forRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UITableViewRowAction *deleteAction =
|
||||
[UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault
|
||||
title:NSLocalizedString(@"TXT_DELETE_TITLE", nil)
|
||||
|
@ -617,7 +632,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
if (self.viewingThreadsIn == kInboxState) {
|
||||
archiveAction = [UITableViewRowAction
|
||||
rowActionWithStyle:UITableViewRowActionStyleNormal
|
||||
title:NSLocalizedString(@"ARCHIVE_ACTION", @"Pressing this button moves a thread from the inbox to the archive")
|
||||
title:NSLocalizedString(@"ARCHIVE_ACTION",
|
||||
@"Pressing this button moves a thread from the inbox to the archive")
|
||||
handler:^(UITableViewRowAction *_Nonnull action, NSIndexPath *_Nonnull tappedIndexPath) {
|
||||
[self archiveIndexPath:tappedIndexPath];
|
||||
[Environment.preferences setHasArchivedAMessage:YES];
|
||||
|
@ -626,7 +642,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
} else {
|
||||
archiveAction = [UITableViewRowAction
|
||||
rowActionWithStyle:UITableViewRowActionStyleNormal
|
||||
title:NSLocalizedString(@"UNARCHIVE_ACTION", @"Pressing this button moves an archived thread from the archive back to the inbox")
|
||||
title:NSLocalizedString(@"UNARCHIVE_ACTION",
|
||||
@"Pressing this button moves an archived thread from the archive back to the inbox")
|
||||
handler:^(UITableViewRowAction *_Nonnull action, NSIndexPath *_Nonnull tappedIndexPath) {
|
||||
[self archiveIndexPath:tappedIndexPath];
|
||||
}];
|
||||
|
@ -636,13 +653,15 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
return @[ deleteAction, archiveAction ];
|
||||
}
|
||||
|
||||
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
#pragma mark - HomeFeedTableViewCellDelegate
|
||||
|
||||
- (void)tableViewCellTappedDelete:(NSIndexPath *)indexPath {
|
||||
- (void)tableViewCellTappedDelete:(NSIndexPath *)indexPath
|
||||
{
|
||||
TSThread *thread = [self threadForIndexPath:indexPath];
|
||||
if ([thread isKindOfClass:[TSGroupThread class]]) {
|
||||
|
||||
|
@ -683,7 +702,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
}
|
||||
}
|
||||
|
||||
- (void)deleteThread:(TSThread *)thread {
|
||||
- (void)deleteThread:(TSThread *)thread
|
||||
{
|
||||
[self.editingDbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
[thread removeWithTransaction:transaction];
|
||||
}];
|
||||
|
@ -692,7 +712,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
[self checkIfEmptyView];
|
||||
}
|
||||
|
||||
- (void)archiveIndexPath:(NSIndexPath *)indexPath {
|
||||
- (void)archiveIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
TSThread *thread = [self threadForIndexPath:indexPath];
|
||||
|
||||
BOOL viewingThreadsIn = self.viewingThreadsIn;
|
||||
|
@ -719,7 +740,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
[_segmentedControl reloadInputViews];
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
TSThread *thread = [self threadForIndexPath:indexPath];
|
||||
[self presentThread:thread keyboardOnViewAppearing:NO callOnViewAppearing:NO];
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
@ -736,8 +758,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
|
||||
// We do this synchronously if we're already on the main thread.
|
||||
DispatchMainThreadSafe(^{
|
||||
MessagesViewController *mvc = [[MessagesViewController alloc] initWithNibName:@"MessagesViewController"
|
||||
bundle:nil];
|
||||
ConversationViewController *mvc =
|
||||
[[ConversationViewController alloc] initWithNibName:@"ConversationViewController" bundle:nil];
|
||||
[mvc configureForThread:thread
|
||||
keyboardOnViewAppearing:keyboardOnViewAppearing
|
||||
callOnViewAppearing:callOnViewAppearing];
|
||||
|
@ -865,7 +887,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
|
||||
#pragma mark Database delegates
|
||||
|
||||
- (YapDatabaseConnection *)uiDatabaseConnection {
|
||||
- (YapDatabaseConnection *)uiDatabaseConnection
|
||||
{
|
||||
NSAssert([NSThread isMainThread], @"Must access uiDatabaseConnection on main thread!");
|
||||
if (!_uiDatabaseConnection) {
|
||||
YapDatabase *database = TSStorageManager.sharedManager.database;
|
||||
|
@ -875,7 +898,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
return _uiDatabaseConnection;
|
||||
}
|
||||
|
||||
- (void)yapDatabaseModified:(NSNotification *)notification {
|
||||
- (void)yapDatabaseModified:(NSNotification *)notification
|
||||
{
|
||||
if (!self.shouldObserveDBModifications) {
|
||||
return;
|
||||
}
|
||||
|
@ -964,7 +988,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
[self.tableView endUpdates];
|
||||
}
|
||||
|
||||
- (void)checkIfEmptyView {
|
||||
- (void)checkIfEmptyView
|
||||
{
|
||||
[_tableView setHidden:NO];
|
||||
[_emptyBoxLabel setHidden:NO];
|
||||
if (self.viewingThreadsIn == kInboxState && [self.threadMappings numberOfItemsInGroup:TSInboxGroup] == 0) {
|
||||
|
@ -979,7 +1004,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setEmptyBoxText {
|
||||
- (void)setEmptyBoxText
|
||||
{
|
||||
_emptyBoxLabel.textColor = [UIColor grayColor];
|
||||
_emptyBoxLabel.font = [UIFont ows_regularFontWithSize:18.f];
|
||||
_emptyBoxLabel.textAlignment = NSTextAlignmentCenter;
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageComposeTableViewController : OWSViewController
|
||||
@interface NewContactThreadViewController : OWSViewController
|
||||
|
||||
@end
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MessageComposeTableViewController.h"
|
||||
#import "NewContactThreadViewController.h"
|
||||
#import "ContactTableViewCell.h"
|
||||
#import "ContactsViewHelper.h"
|
||||
#import "Environment.h"
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageComposeTableViewController () <UISearchBarDelegate,
|
||||
@interface NewContactThreadViewController () <UISearchBarDelegate,
|
||||
ContactsViewHelperDelegate,
|
||||
OWSTableViewControllerDelegate,
|
||||
NewNonContactConversationViewControllerDelegate,
|
||||
|
@ -51,7 +51,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
#pragma mark -
|
||||
|
||||
@implementation MessageComposeTableViewController
|
||||
@implementation NewContactThreadViewController
|
||||
|
||||
- (void)loadView
|
||||
{
|
||||
|
@ -211,7 +211,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return view;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
self.title = NSLocalizedString(@"MESSAGE_COMPOSEVIEW_TITLE", @"");
|
||||
|
@ -231,13 +232,15 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
[self showContactAppropriateViews];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
[self showIOSUpgradeNagIfNecessary];
|
||||
}
|
||||
|
||||
- (void)showIOSUpgradeNagIfNecessary {
|
||||
- (void)showIOSUpgradeNagIfNecessary
|
||||
{
|
||||
// Only show the nag to iOS 8 users.
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(9, 0)) {
|
||||
return;
|
||||
|
@ -253,13 +256,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
NSString *currentAppVersion = [AppVersion instance].currentAppVersion;
|
||||
OWSAssert(currentAppVersion.length > 0);
|
||||
NSString *lastNagAppVersion = [Environment.preferences iOSUpgradeNagVersion];
|
||||
if (lastNagAppVersion &&
|
||||
![lastNagAppVersion isEqualToString:currentAppVersion]) {
|
||||
if (lastNagAppVersion && ![lastNagAppVersion isEqualToString:currentAppVersion]) {
|
||||
|
||||
[Environment.preferences setIOSUpgradeNagVersion:currentAppVersion];
|
||||
|
||||
[OWSAlerts showAlertWithTitle:
|
||||
NSLocalizedString(@"UPGRADE_IOS_ALERT_TITLE",
|
||||
[OWSAlerts showAlertWithTitle:NSLocalizedString(@"UPGRADE_IOS_ALERT_TITLE",
|
||||
@"Title for the alert indicating that user should upgrade iOS.")
|
||||
message:NSLocalizedString(@"UPGRADE_IOS_ALERT_MESSAGE",
|
||||
@"Message for the alert indicating that user should upgrade iOS.")];
|
||||
|
@ -277,7 +278,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return;
|
||||
}
|
||||
|
||||
__weak MessageComposeTableViewController *weakSelf = self;
|
||||
__weak NewContactThreadViewController *weakSelf = self;
|
||||
ContactsViewHelper *helper = self.contactsViewHelper;
|
||||
|
||||
OWSTableSection *section = [OWSTableSection new];
|
||||
|
@ -461,8 +462,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
- (void)showContactAppropriateViews
|
||||
{
|
||||
if (self.contactsViewHelper.contactsManager.isSystemContactsAuthorized) {
|
||||
if (self.contactsViewHelper.hasUpdatedContactsAtLeastOnce
|
||||
&& self.contactsViewHelper.signalAccounts.count < 1
|
||||
if (self.contactsViewHelper.hasUpdatedContactsAtLeastOnce && self.contactsViewHelper.signalAccounts.count < 1
|
||||
&& ![[Environment preferences] hasDeclinedNoContactsView]) {
|
||||
self.isNoContactsModeActive = YES;
|
||||
} else {
|
||||
|
@ -502,12 +502,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
#pragma mark - Send Invite By SMS
|
||||
|
||||
- (void)sendTextToPhoneNumber:(NSString *)phoneNumber {
|
||||
- (void)sendTextToPhoneNumber:(NSString *)phoneNumber
|
||||
{
|
||||
OWSAssert([phoneNumber length] > 0);
|
||||
NSString *confirmMessage = NSLocalizedString(@"SEND_SMS_CONFIRM_TITLE", @"");
|
||||
if ([phoneNumber length] > 0) {
|
||||
confirmMessage = [[NSLocalizedString(@"SEND_SMS_INVITE_TITLE", @"")
|
||||
stringByAppendingString:phoneNumber]
|
||||
confirmMessage = [[NSLocalizedString(@"SEND_SMS_INVITE_TITLE", @"") stringByAppendingString:phoneNumber]
|
||||
stringByAppendingString:NSLocalizedString(@"QUESTIONMARK_PUNCTUATION", @"")];
|
||||
}
|
||||
|
||||
|
@ -543,10 +543,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
[alertController addAction:okAction];
|
||||
self.searchBar.text = @"";
|
||||
|
||||
//must dismiss search controller before presenting alert.
|
||||
// must dismiss search controller before presenting alert.
|
||||
if ([self presentedViewController]) {
|
||||
[self dismissViewControllerAnimated:YES completion:^{
|
||||
[self presentViewController:alertController animated:YES completion:[UIUtil modalCompletionBlock]];
|
||||
[self dismissViewControllerAnimated:YES
|
||||
completion:^{
|
||||
[self presentViewController:alertController
|
||||
animated:YES
|
||||
completion:[UIUtil modalCompletionBlock]];
|
||||
}];
|
||||
} else {
|
||||
[self presentViewController:alertController animated:YES completion:[UIUtil modalCompletionBlock]];
|
||||
|
@ -557,7 +560,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
// called on completion of message screen
|
||||
- (void)messageComposeViewController:(MFMessageComposeViewController *)controller
|
||||
didFinishWithResult:(MessageComposeResult)result {
|
||||
didFinishWithResult:(MessageComposeResult)result
|
||||
{
|
||||
switch (result) {
|
||||
case MessageComposeResultCancelled:
|
||||
break;
|
||||
|
@ -576,8 +580,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
completion:^{
|
||||
DDLogDebug(@"view controller dismissed");
|
||||
}];
|
||||
UIAlertView *successAlert =
|
||||
[[UIAlertView alloc] initWithTitle:@""
|
||||
UIAlertView *successAlert = [[UIAlertView alloc]
|
||||
initWithTitle:@""
|
||||
message:NSLocalizedString(@"SEND_INVITE_SUCCESS", @"Alert body after invite succeeded")
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"OK", @"")
|
||||
|
@ -760,7 +764,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return;
|
||||
}
|
||||
|
||||
__weak MessageComposeTableViewController *weakSelf = self;
|
||||
__weak NewContactThreadViewController *weakSelf = self;
|
||||
[[ContactsUpdater sharedUpdater] lookupIdentifiers:unknownPhoneNumbers
|
||||
success:^(NSArray<SignalRecipient *> *recipients) {
|
||||
[weakSelf updateNonContactAccountSet:recipients];
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class SignalsViewController;
|
||||
@class HomeViewController;
|
||||
|
||||
@interface ProfileViewController : UIViewController
|
||||
|
||||
|
@ -14,8 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
+ (void)presentForAppSettings:(UINavigationController *)navigationController;
|
||||
+ (void)presentForRegistration:(UINavigationController *)navigationController;
|
||||
+ (void)presentForUpgradeOrNag:(SignalsViewController *)presentingController
|
||||
NS_SWIFT_NAME(presentForUpgradeOrNag(from:));
|
||||
+ (void)presentForUpgradeOrNag:(HomeViewController *)presentingController NS_SWIFT_NAME(presentForUpgradeOrNag(from:));
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#import "ProfileViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "AvatarViewHelper.h"
|
||||
#import "HomeViewController.h"
|
||||
#import "OWSNavigationController.h"
|
||||
#import "OWSProfileManager.h"
|
||||
#import "Signal-Swift.h"
|
||||
#import "SignalsNavigationController.h"
|
||||
#import "SignalsViewController.h"
|
||||
#import "UIColor+OWS.h"
|
||||
#import "UIFont+OWS.h"
|
||||
#import "UIView+OWS.h"
|
||||
|
@ -434,13 +434,13 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|||
|
||||
- (void)showHomeView
|
||||
{
|
||||
SignalsViewController *homeView = [SignalsViewController new];
|
||||
HomeViewController *homeView = [HomeViewController new];
|
||||
homeView.newlyRegisteredUser = YES;
|
||||
SignalsNavigationController *navigationController =
|
||||
[[SignalsNavigationController alloc] initWithRootViewController:homeView];
|
||||
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
||||
appDelegate.window.rootViewController = navigationController;
|
||||
OWSAssert([navigationController.topViewController isKindOfClass:[SignalsViewController class]]);
|
||||
OWSAssert([navigationController.topViewController isKindOfClass:[HomeViewController class]]);
|
||||
}
|
||||
|
||||
#pragma mark - UITextFieldDelegate
|
||||
|
@ -554,7 +554,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|||
[navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
+ (void)presentForUpgradeOrNag:(SignalsViewController *)presentingController
|
||||
+ (void)presentForUpgradeOrNag:(HomeViewController *)presentingController
|
||||
{
|
||||
OWSAssert(presentingController);
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#import "ContactTableViewCell.h"
|
||||
#import "ContactsViewHelper.h"
|
||||
#import "Environment.h"
|
||||
#import "HomeViewController.h"
|
||||
#import "OWSContactsManager.h"
|
||||
#import "SignalsViewController.h"
|
||||
#import "Signal-Swift.h"
|
||||
#import "UIUtil.h"
|
||||
#import "ViewControllerUtils.h"
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#import "ViewControllerUtils.h"
|
||||
#import "Environment.h"
|
||||
#import "HomeViewController.h"
|
||||
#import "PhoneNumber.h"
|
||||
#import "Signal-Swift.h"
|
||||
#import "SignalsViewController.h"
|
||||
#import "StringUtil.h"
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <SignalServiceKit/PhoneNumberUtil.h>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
@class UINavigationController;
|
||||
@class OWSContactsManager;
|
||||
@class OutboundCallInitiator;
|
||||
@class SignalsViewController;
|
||||
@class HomeViewController;
|
||||
@class TSGroupThread;
|
||||
@class ContactsUpdater;
|
||||
@class TSNetworkManager;
|
||||
|
@ -49,7 +49,7 @@
|
|||
@property (nonatomic, readonly) PropertyListPreferences *preferences;
|
||||
|
||||
|
||||
@property (nonatomic, readonly) SignalsViewController *signalsViewController;
|
||||
@property (nonatomic, readonly) HomeViewController *signalsViewController;
|
||||
@property (nonatomic, readonly, weak) UINavigationController *signUpFlowNavigationController;
|
||||
|
||||
+ (Environment *)getCurrent;
|
||||
|
@ -59,7 +59,7 @@
|
|||
|
||||
+ (void)resetAppData;
|
||||
|
||||
- (void)setSignalsViewController:(SignalsViewController *)signalsViewController;
|
||||
- (void)setHomeViewController:(HomeViewController *)signalsViewController;
|
||||
- (void)setSignUpFlowNavigationController:(UINavigationController *)signUpFlowNavigationController;
|
||||
|
||||
+ (void)messageThreadId:(NSString *)threadId;
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
//
|
||||
|
||||
#import "Environment.h"
|
||||
#import "ConversationViewController.h"
|
||||
#import "DebugLogger.h"
|
||||
#import "FunctionalUtil.h"
|
||||
#import "MessagesViewController.h"
|
||||
#import "HomeViewController.h"
|
||||
#import "Signal-Swift.h"
|
||||
#import "SignalKeyingStorage.h"
|
||||
#import "SignalsViewController.h"
|
||||
#import "TSContactThread.h"
|
||||
#import "TSGroupThread.h"
|
||||
#import <SignalServiceKit/ContactsUpdater.h>
|
||||
|
@ -171,7 +171,8 @@ static Environment *environment = nil;
|
|||
return _preferences;
|
||||
}
|
||||
|
||||
- (void)setSignalsViewController:(SignalsViewController *)signalsViewController {
|
||||
- (void)setHomeViewController:(HomeViewController *)signalsViewController
|
||||
{
|
||||
_signalsViewController = signalsViewController;
|
||||
}
|
||||
|
||||
|
@ -191,11 +192,11 @@ static Environment *environment = nil;
|
|||
[self messageGroup:(TSGroupThread *)thread];
|
||||
} else {
|
||||
Environment *env = [self getCurrent];
|
||||
SignalsViewController *vc = env.signalsViewController;
|
||||
HomeViewController *vc = env.signalsViewController;
|
||||
UIViewController *topvc = vc.navigationController.topViewController;
|
||||
|
||||
if ([topvc isKindOfClass:[MessagesViewController class]]) {
|
||||
MessagesViewController *mvc = (MessagesViewController *)topvc;
|
||||
if ([topvc isKindOfClass:[ConversationViewController class]]) {
|
||||
ConversationViewController *mvc = (ConversationViewController *)topvc;
|
||||
if ([mvc.thread.uniqueId isEqualToString:threadId]) {
|
||||
[mvc popKeyBoard];
|
||||
return;
|
||||
|
@ -207,7 +208,7 @@ static Environment *environment = nil;
|
|||
|
||||
+ (void)messageIdentifier:(NSString *)identifier withCompose:(BOOL)compose {
|
||||
Environment *env = [self getCurrent];
|
||||
SignalsViewController *vc = env.signalsViewController;
|
||||
HomeViewController *vc = env.signalsViewController;
|
||||
|
||||
[[TSStorageManager sharedManager].dbReadWriteConnection
|
||||
asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
|
||||
|
@ -219,7 +220,7 @@ static Environment *environment = nil;
|
|||
+ (void)callUserWithIdentifier:(NSString *)identifier
|
||||
{
|
||||
Environment *env = [self getCurrent];
|
||||
SignalsViewController *vc = env.signalsViewController;
|
||||
HomeViewController *vc = env.signalsViewController;
|
||||
|
||||
[[TSStorageManager sharedManager].dbReadWriteConnection
|
||||
asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
|
||||
|
@ -230,7 +231,7 @@ static Environment *environment = nil;
|
|||
|
||||
+ (void)messageGroup:(TSGroupThread *)groupThread {
|
||||
Environment *env = [self getCurrent];
|
||||
SignalsViewController *vc = env.signalsViewController;
|
||||
HomeViewController *vc = env.signalsViewController;
|
||||
|
||||
[vc presentThread:groupThread keyboardOnViewAppearing:YES callOnViewAppearing:NO];
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ NSString *const TSStorageManagerAppUpgradeNagDate = @"TSStorageManagerAppUpgrade
|
|||
UIViewController *frontmostViewController =
|
||||
[UIApplication sharedApplication].frontmostViewController;
|
||||
OWSAssert(frontmostViewController);
|
||||
BOOL canPresent = ([frontmostViewController isKindOfClass:[SignalsViewController class]] ||
|
||||
BOOL canPresent = ([frontmostViewController isKindOfClass:[HomeViewController class]] ||
|
||||
[frontmostViewController isKindOfClass:[RegistrationViewController class]]);
|
||||
if (!canPresent) {
|
||||
return;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SignalsViewController.h"
|
||||
#import "HomeViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
|
||||
#import "OWSExpirationTimerView.h"
|
||||
#import "MessagesViewController.h"
|
||||
#import "ConversationViewController.h"
|
||||
#import "UIColor+OWS.h"
|
||||
#import <QuartzCore/CAShapeLayer.h>
|
||||
|
||||
|
@ -110,7 +110,7 @@ double const OWSExpirationTimerViewBlinkingSeconds = 2;
|
|||
self.initialDurationSeconds = initialDurationSeconds;
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleReappearNotification:)
|
||||
name:OWSMessagesViewControllerDidAppearNotification
|
||||
name:ConversationViewControllerDidAppearNotification
|
||||
object:nil];
|
||||
[self startAnimation];
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ double const OWSExpirationTimerViewBlinkingSeconds = 2;
|
|||
- (void)stopTimer
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self
|
||||
name:OWSMessagesViewControllerDidAppearNotification
|
||||
name:ConversationViewControllerDidAppearNotification
|
||||
object:nil];
|
||||
|
||||
[self.layer removeAnimationForKey:@"alphaBlink"];
|
||||
|
|
Loading…
Reference in a new issue