diff --git a/CHANGES.rst b/CHANGES.rst index 0aad4163b..28ae5d99f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,7 @@ Changes to be released in next version 🐛 Bugfix * SSO: Handle login callback URL with HTML entities (#4129). + * Share extension: Fix theme in dark mode (#4486). ⚠️ API Changes * diff --git a/RiotShareExtension/Modules/Fallback/FallbackViewController.m b/RiotShareExtension/Modules/Fallback/FallbackViewController.m index da7ebc5f1..ce5774a69 100644 --- a/RiotShareExtension/Modules/Fallback/FallbackViewController.m +++ b/RiotShareExtension/Modules/Fallback/FallbackViewController.m @@ -36,6 +36,7 @@ { [super viewDidLoad]; + self.view.backgroundColor = ThemeService.shared.theme.backgroundColor; self.titleLabel.textColor = ThemeService.shared.theme.textSecondaryColor; self.titleLabel.text = NSLocalizedStringFromTable(@"share_extension_auth_prompt", @"Vector", nil); self.logoImageView.tintColor = ThemeService.shared.theme.tintColor; diff --git a/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.m b/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.m index 52ccd3af3..777249a6e 100644 --- a/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.m +++ b/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.m @@ -75,6 +75,7 @@ { [super viewDidLoad]; + self.recentsTableView.backgroundColor = ThemeService.shared.theme.backgroundColor; [self.recentsTableView registerNib:[RecentRoomTableViewCell nib] forCellReuseIdentifier:[RecentRoomTableViewCell defaultReuseIdentifier]]; [self configureSearchBar]; @@ -97,6 +98,7 @@ self.recentsSearchBar.searchBarStyle = UISearchBarStyleMinimal; self.recentsSearchBar.placeholder = NSLocalizedStringFromTable(@"search_default_placeholder", @"Vector", nil); self.recentsSearchBar.tintColor = ThemeService.shared.theme.tintColor; + self.recentsSearchBar.backgroundColor = ThemeService.shared.theme.baseColor; _tableSearchBar.tintColor = self.recentsSearchBar.tintColor; } diff --git a/RiotShareExtension/Modules/Share/Listing/Views/RecentRoomTableViewCell.m b/RiotShareExtension/Modules/Share/Listing/Views/RecentRoomTableViewCell.m index c6c81052a..14a16a68f 100644 --- a/RiotShareExtension/Modules/Share/Listing/Views/RecentRoomTableViewCell.m +++ b/RiotShareExtension/Modules/Share/Listing/Views/RecentRoomTableViewCell.m @@ -17,6 +17,8 @@ #import "RecentRoomTableViewCell.h" #import "MXRoomSummary+Riot.h" +#import "ThemeService.h" +#import "RiotShareExtension-Swift.h" @interface RecentRoomTableViewCell () @@ -44,6 +46,14 @@ return nil; } +- (void)awakeFromNib +{ + [super awakeFromNib]; + + self.roomTitleLabel.textColor = ThemeService.shared.theme.textPrimaryColor; + self.contentView.backgroundColor = ThemeService.shared.theme.backgroundColor; +} + - (void)layoutSubviews { [super layoutSubviews]; diff --git a/RiotShareExtension/Modules/Share/ShareViewController.m b/RiotShareExtension/Modules/Share/ShareViewController.m index 5d8aa81fd..54976634b 100644 --- a/RiotShareExtension/Modules/Share/ShareViewController.m +++ b/RiotShareExtension/Modules/Share/ShareViewController.m @@ -21,11 +21,14 @@ #import "ShareDataSource.h" #import "ShareExtensionManager.h" +#import "ThemeService.h" +#import "RiotShareExtension-Swift.h" + @interface ShareViewController () @property (weak, nonatomic) IBOutlet UIView *masterContainerView; -@property (weak, nonatomic) IBOutlet UILabel *tittleLabel; +@property (weak, nonatomic) IBOutlet UILabel *titleLabel; @property (weak, nonatomic) IBOutlet UIView *contentView; @property (nonatomic) SegmentedViewController *segmentedViewController; @@ -44,6 +47,10 @@ { [super viewDidLoad]; + self.view.tintColor = ThemeService.shared.theme.tintColor; + self.titleLabel.textColor = ThemeService.shared.theme.textPrimaryColor; + self.masterContainerView.backgroundColor = ThemeService.shared.theme.baseColor; + self.shareExtensionManagerDidUpdateAccountDataObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kShareExtensionManagerDidUpdateAccountDataNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) { [self configureViews]; @@ -96,14 +103,14 @@ if ([ShareExtensionManager sharedManager].userAccount) { - self.tittleLabel.text = [NSString stringWithFormat:NSLocalizedStringFromTable(@"send_to", @"Vector", nil), @""]; + self.titleLabel.text = [NSString stringWithFormat:NSLocalizedStringFromTable(@"send_to", @"Vector", nil), @""]; [self configureSegmentedViewController]; } else { NSDictionary *infoDictionary = [NSBundle mainBundle].infoDictionary; NSString *bundleDisplayName = infoDictionary[@"CFBundleDisplayName"]; - self.tittleLabel.text = bundleDisplayName; + self.titleLabel.text = bundleDisplayName; [self configureFallbackViewController]; } } diff --git a/RiotShareExtension/Modules/Share/ShareViewController.xib b/RiotShareExtension/Modules/Share/ShareViewController.xib index 517dbd282..04a1316c8 100644 --- a/RiotShareExtension/Modules/Share/ShareViewController.xib +++ b/RiotShareExtension/Modules/Share/ShareViewController.xib @@ -1,12 +1,9 @@ - - - - + + - - + @@ -14,7 +11,7 @@ - + @@ -23,10 +20,6 @@ - - - - @@ -34,7 +27,7 @@ - - - @@ -94,7 +84,6 @@ -