Settings and Empty States of the 98 issues list.
- Fixes some thread ordering issues. - Green color for settings. - New archive placeholder. - Warning before unregistering.
This commit is contained in:
parent
720177f921
commit
d912471a94
|
@ -42,8 +42,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (UIColor *) ows_greenColor {
|
+ (UIColor *) ows_greenColor {
|
||||||
// green: #92FF8A
|
// green: #BF4240
|
||||||
return [UIColor colorWithRed:146.f/255.f green:255.f/255.f blue:138.f/255.f alpha:1.f];
|
return [UIColor colorWithRed:66.f/255.f green:191.f/255.f blue:64.f/255.f alpha:1.f];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (UIColor *) ows_redColor {
|
+ (UIColor *) ows_redColor {
|
||||||
|
|
|
@ -271,7 +271,7 @@ dispatch_queue_t sendingQueue() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) saveGroupMessage:(TSOutgoingMessage*)message inThread:(TSThread*)thread{
|
- (void)saveGroupMessage:(TSOutgoingMessage*)message inThread:(TSThread*)thread{
|
||||||
if(message.groupMetaMessage==TSGroupMessageDeliver) {
|
if(message.groupMetaMessage==TSGroupMessageDeliver) {
|
||||||
[self saveMessage:message withState:message.messageState];
|
[self saveMessage:message withState:message.messageState];
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
self.separatorInset = UIEdgeInsetsMake(0,_contactPictureView.frame.size.width*1.5f, 0, 0);
|
self.separatorInset = UIEdgeInsetsMake(0,_contactPictureView.frame.size.width*1.5f, 0, 0);
|
||||||
|
|
||||||
|
if (thread.hasUnreadMessages) {
|
||||||
|
[self updateCellForUnreadMessage];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)configureForState:(CellState)state
|
-(void)configureForState:(CellState)state
|
||||||
|
|
|
@ -74,7 +74,7 @@ typedef enum {
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
[self.navigationController.navigationBar setTranslucent:NO];
|
[self.navigationController.navigationBar setTranslucent:NO];
|
||||||
|
|
||||||
self.tableView.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];
|
self.tableView.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];
|
||||||
self.registeredNumber.text = [PhoneNumber bestEffortFormatPartialUserSpecifiedTextToLookLikeAPhoneNumber:[TSAccountManager registeredNumber]];
|
self.registeredNumber.text = [PhoneNumber bestEffortFormatPartialUserSpecifiedTextToLookLikeAPhoneNumber:[TSAccountManager registeredNumber]];
|
||||||
[self findAndSetRegisteredName];
|
[self findAndSetRegisteredName];
|
||||||
|
@ -164,7 +164,7 @@ typedef enum {
|
||||||
|
|
||||||
case kUnregisterSection:
|
case kUnregisterSection:
|
||||||
{
|
{
|
||||||
[self unregisterUser:self];
|
[self unregisterUser:nil];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,6 +175,19 @@ typedef enum {
|
||||||
|
|
||||||
|
|
||||||
-(IBAction)unregisterUser:(id)sender {
|
-(IBAction)unregisterUser:(id)sender {
|
||||||
|
|
||||||
|
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Are you sure you want to destroy your account?"
|
||||||
|
message:@"This will reset the application by deleting your messages and unregister you with the server. The app will close after deletion of data."
|
||||||
|
preferredStyle:UIAlertControllerStyleAlert];
|
||||||
|
[alertController addAction:[UIAlertAction actionWithTitle:@"Proceed" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
||||||
|
[self unregisterUser:self];
|
||||||
|
}]];
|
||||||
|
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||||
|
|
||||||
|
[self presentViewController:alertController animated:YES completion:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)proceedToUnregistration{
|
||||||
[TSAccountManager unregisterTextSecureWithSuccess:^{
|
[TSAccountManager unregisterTextSecureWithSuccess:^{
|
||||||
[PushManager.sharedManager registrationForPushWithSuccess:^(NSData* pushToken){
|
[PushManager.sharedManager registrationForPushWithSuccess:^(NSData* pushToken){
|
||||||
[[RPServerRequestsManager sharedInstance]performRequest:[RPAPICall unregisterWithPushToken:pushToken] success:^(NSURLSessionDataTask *task, id responseObject) {
|
[[RPServerRequestsManager sharedInstance]performRequest:[RPAPICall unregisterWithPushToken:pushToken] success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||||
|
@ -187,7 +200,7 @@ typedef enum {
|
||||||
SignalAlertView(@"Failed to unregister RedPhone component of Signal", @"");
|
SignalAlertView(@"Failed to unregister RedPhone component of Signal", @"");
|
||||||
}];
|
}];
|
||||||
} failure:^(NSError *error) {
|
} failure:^(NSError *error) {
|
||||||
SignalAlertView(@"Failed to unregister TextSecure component of Signal", @"");
|
SignalAlertView(@"Failed to unregister TextSecure component of Signal", @"");
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -427,8 +427,8 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_emptyBoxImage.image = [UIImage imageNamed:@"uiEmptyArchive"];
|
_emptyBoxImage.image = [UIImage imageNamed:@"uiEmptyArchive"];
|
||||||
firstLine = @"Save conversations for reference.";
|
firstLine = @"Clean Up Your Conversations.";
|
||||||
secondLine = @"You can swipe conversations into your Archive from the Inbox.";
|
secondLine = @"You can archive inactive conversations for later from your Inbox.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NSMutableAttributedString *fullLabelString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@",firstLine,secondLine]];
|
NSMutableAttributedString *fullLabelString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@",firstLine,secondLine]];
|
||||||
|
|
Loading…
Reference in New Issue