pull/253/head
nielsandriesse 5 years ago
parent f6c8f5dcf5
commit ba9f23619d

@ -9,6 +9,7 @@
#import <SignalMessaging/OWSPreferences.h>
#import <SignalMessaging/ThreadUtil.h>
#import <SignalMessaging/UIColor+OWS.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/NSString+SSK.h>
#import <SessionServiceKit/OWS2FAManager.h>
#import <SessionServiceKit/OWSReadReceiptManager.h>
@ -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

@ -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];

@ -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<ConversationViewItem>)viewItem

Loading…
Cancel
Save