From 77cbfe5618c68be0624c3622d9658ef69d32e639 Mon Sep 17 00:00:00 2001 From: Ivan Sein Date: Wed, 11 Nov 2020 17:52:31 +0100 Subject: [PATCH] Set color to conversations-placeholder icon. Signed-off-by: Ivan Sein --- NextcloudTalk/NCAppBranding.h | 1 + NextcloudTalk/NCAppBranding.m | 5 +++++ NextcloudTalk/RoomSearchTableViewController.m | 3 +++ NextcloudTalk/RoomsTableViewController.m | 2 ++ ShareExtension/ShareViewController.m | 4 ++++ 5 files changed, 15 insertions(+) diff --git a/NextcloudTalk/NCAppBranding.h b/NextcloudTalk/NCAppBranding.h index ff8914ef..f42cf788 100644 --- a/NextcloudTalk/NCAppBranding.h +++ b/NextcloudTalk/NCAppBranding.h @@ -45,6 +45,7 @@ extern BOOL const customNavigationLogo; + (UIColor *)themeColor; + (UIColor *)themeTextColor; + (NSString *)navigationLogoImageName; ++ (UIColor *)placeholderColor; @end diff --git a/NextcloudTalk/NCAppBranding.m b/NextcloudTalk/NCAppBranding.m index 0e9bc874..d86d8a28 100644 --- a/NextcloudTalk/NCAppBranding.m +++ b/NextcloudTalk/NCAppBranding.m @@ -91,4 +91,9 @@ BOOL const useServerThemimg = YES; return imageName; } ++ (UIColor *)placeholderColor +{ + return [UIColor colorWithRed: 0.84 green: 0.84 blue: 0.84 alpha: 1.00]; // #d5d5d5 +} + @end diff --git a/NextcloudTalk/RoomSearchTableViewController.m b/NextcloudTalk/RoomSearchTableViewController.m index 0b3fbcc6..6b261667 100644 --- a/NextcloudTalk/RoomSearchTableViewController.m +++ b/NextcloudTalk/RoomSearchTableViewController.m @@ -23,6 +23,7 @@ #import "RoomSearchTableViewController.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCRoom.h" #import "NCSettingsController.h" #import "NSDate+DateTools.h" @@ -48,6 +49,8 @@ // Contacts placeholder view _roomSearchBackgroundView = [[PlaceholderView alloc] init]; [_roomSearchBackgroundView.placeholderImage setImage:[UIImage imageNamed:@"conversations-placeholder"]]; + _roomSearchBackgroundView.placeholderImage.image = [_roomSearchBackgroundView.placeholderImage.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + [_roomSearchBackgroundView.placeholderImage setTintColor:[NCAppBranding placeholderColor]]; [_roomSearchBackgroundView.placeholderText setText:NSLocalizedString(@"No results found", nil)]; [_roomSearchBackgroundView.placeholderView setHidden:YES]; [_roomSearchBackgroundView.loadingView startAnimating]; diff --git a/NextcloudTalk/RoomsTableViewController.m b/NextcloudTalk/RoomsTableViewController.m index d9e43147..186d5cda 100644 --- a/NextcloudTalk/RoomsTableViewController.m +++ b/NextcloudTalk/RoomsTableViewController.m @@ -107,6 +107,8 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success); // Rooms placeholder view _roomsBackgroundView = [[PlaceholderView alloc] init]; [_roomsBackgroundView.placeholderImage setImage:[UIImage imageNamed:@"conversations-placeholder"]]; + _roomsBackgroundView.placeholderImage.image = [_roomsBackgroundView.placeholderImage.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + [_roomsBackgroundView.placeholderImage setTintColor:[NCAppBranding placeholderColor]]; [_roomsBackgroundView.placeholderText setText:NSLocalizedString(@"You are not part of any conversation. Press + to start a new one.", nil)]; [_roomsBackgroundView.placeholderView setHidden:YES]; [_roomsBackgroundView.loadingView startAnimating]; diff --git a/ShareExtension/ShareViewController.m b/ShareExtension/ShareViewController.m index 9b5b6803..f50163f1 100644 --- a/ShareExtension/ShareViewController.m +++ b/ShareExtension/ShareViewController.m @@ -160,6 +160,8 @@ // Rooms placeholder view _roomsBackgroundView = [[PlaceholderView alloc] init]; [_roomsBackgroundView.placeholderImage setImage:[UIImage imageNamed:@"conversations-placeholder"]]; + _roomsBackgroundView.placeholderImage.image = [_roomsBackgroundView.placeholderImage.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + [_roomsBackgroundView.placeholderImage setTintColor:[NCAppBranding placeholderColor]]; [_roomsBackgroundView.placeholderText setText:NSLocalizedString(@"You are not part of any conversation", nil)]; [_roomsBackgroundView.placeholderView setHidden:(_rooms.count > 0)]; [_roomsBackgroundView.loadingView setHidden:YES]; @@ -167,6 +169,8 @@ _roomSearchBackgroundView = [[PlaceholderView alloc] init]; [_roomSearchBackgroundView.placeholderImage setImage:[UIImage imageNamed:@"conversations-placeholder"]]; + _roomSearchBackgroundView.placeholderImage.image = [_roomSearchBackgroundView.placeholderImage.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + [_roomSearchBackgroundView.placeholderImage setTintColor:[NCAppBranding placeholderColor]]; [_roomSearchBackgroundView.placeholderText setText:NSLocalizedString(@"No results found", nil)]; [_roomSearchBackgroundView.placeholderView setHidden:YES]; [_roomSearchBackgroundView.loadingView setHidden:YES];