From ba9f23619db63d9807e26d8ef4156ecbb7eae939 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 27 Aug 2020 15:20:25 +1000 Subject: [PATCH] WIP --- .../PrivacySettingsTableViewController.m | 20 ++----------------- .../ConversationView/Cells/OWSMessageCell.m | 2 +- .../Cells/OWSMessageFooterView.m | 13 +----------- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/Signal/src/ViewControllers/AppSettings/PrivacySettingsTableViewController.m b/Signal/src/ViewControllers/AppSettings/PrivacySettingsTableViewController.m index 58f1dc88a..6b199deac 100644 --- a/Signal/src/ViewControllers/AppSettings/PrivacySettingsTableViewController.m +++ b/Signal/src/ViewControllers/AppSettings/PrivacySettingsTableViewController.m @@ -9,6 +9,7 @@ #import #import #import +#import #import #import #import @@ -28,25 +29,8 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s [self updateTableContents]; - // Loki: Set gradient background + [LKViewControllerUtilities setUpDefaultSessionStyleForVC:self withTitle:NSLocalizedString(@"vc_privacy_settings_title", @"") customBackButton:NO]; self.tableView.backgroundColor = UIColor.clearColor; - LKGradient *gradient = LKGradients.defaultLokiBackground; - self.view.backgroundColor = UIColor.clearColor; - [self.view setGradient:gradient]; - - // Loki: Set navigation bar background color - UINavigationBar *navigationBar = self.navigationController.navigationBar; - [navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - navigationBar.shadowImage = [UIImage new]; - [navigationBar setTranslucent:NO]; - navigationBar.barTintColor = LKColors.navigationBarBackground; - - // Loki: Customize title - UILabel *titleLabel = [UILabel new]; - titleLabel.text = NSLocalizedString(@"vc_privacy_settings_title", @""); - titleLabel.textColor = LKColors.text; - titleLabel.font = [UIFont boldSystemFontOfSize:LKValues.veryLargeFontSize]; - self.navigationItem.titleView = titleLabel; } - (void)viewDidAppear:(BOOL)animated diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m index ffbc8e3f9..dc3746bc0 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m @@ -281,7 +281,7 @@ NS_ASSUME_NONNULL_BEGIN [self.avatarView update]; // Loki: Show the moderator icon if needed - if (self.viewItem.isGroupThread && !self.viewItem.isRSSFeed) { + if (self.viewItem.isGroupThread && !self.viewItem.isRSSFeed) { // FIXME: This logic also shouldn't apply to closed groups __block LKPublicChat *publicChat; [OWSPrimaryStorage.sharedManager.dbReadConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) { publicChat = [LKDatabaseUtilities getPublicChatForThreadID:self.viewItem.interaction.uniqueThreadId transaction: transaction]; diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m index d63a8baa8..5261b3c1a 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m @@ -198,18 +198,7 @@ NS_ASSUME_NONNULL_BEGIN timestampLabelText = [DateUtil formatMessageTimestamp:viewItem.interaction.timestamp]; } - TSMessage *message = [viewItem.interaction as:TSMessage.class]; - if (message != nil && message.isP2P) { - NSString *string = [timestampLabelText.localizedUppercaseString stringByAppendingString:@" ยท P2P"]; - NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:string]; - NSRange range = [string rangeOfString:@"P2P"]; - [attributedString beginEditing]; - [attributedString addAttribute:NSFontAttributeName value:[UIFont.ows_dynamicTypeCaption1Font ows_bold] range:range]; - [attributedString endEditing]; - [self.timestampLabel setAttributedText:attributedString]; - } else { - [self.timestampLabel setText:timestampLabelText.localizedUppercaseString]; - } + [self.timestampLabel setText:timestampLabelText.localizedUppercaseString]; } - (CGSize)measureWithConversationViewItem:(id)viewItem