Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
3501955
basic support for a dark theme
Sameesunkaria Mar 25, 2018
26878c5
Merge branch 'develop' into themeable-rc
Sameesunkaria Apr 24, 2018
4922414
Minor fixes after merge
Sameesunkaria Apr 24, 2018
43d2b9f
Chat text field background color added
Sameesunkaria Apr 25, 2018
3785cdf
Accent color added
Sameesunkaria Apr 25, 2018
1c411af
Accent colors applied
Sameesunkaria Apr 25, 2018
78c6929
Fixed theming for the status bar and the text input bar
Sameesunkaria Apr 25, 2018
3cce9ce
fixed preferences
Sameesunkaria Apr 25, 2018
7432ba0
Merge upstream
Sameesunkaria Apr 25, 2018
bff5faa
Merge branch 'develop' into themeable-rc
Sameesunkaria Apr 25, 2018
f7b6f62
Fix PreferencesViewController mapping in project
Sameesunkaria Apr 25, 2018
4a5551e
Emoji picker themed
Sameesunkaria Apr 25, 2018
ab22b09
adapted keyboard appearance
Sameesunkaria Apr 25, 2018
dd24b8a
TODO comment added
Sameesunkaria Apr 25, 2018
b050bef
updated MessageTextFontAttributes
Sameesunkaria Apr 25, 2018
be28f99
Changed how the theme is stored.
Sameesunkaria Apr 26, 2018
478ae7a
Merge upstream
Sameesunkaria Apr 26, 2018
bec5a83
Merge branch 'develop' into themeable-rc
Sameesunkaria Apr 26, 2018
c91c155
Resolved conflicts
Sameesunkaria Apr 26, 2018
6c81904
Refactoring
Sameesunkaria Apr 27, 2018
a4a7320
Themes added
Sameesunkaria Apr 28, 2018
1f395cb
Merge upstream
Sameesunkaria Apr 28, 2018
16a347c
Theme observer added
Sameesunkaria Apr 29, 2018
6ecdb0e
Merge branch 'develop' into themeable-rc
Sameesunkaria Apr 29, 2018
21f530e
Fix project files
Sameesunkaria Apr 29, 2018
52bdfdf
Messsage font colors now update on theme change
Sameesunkaria Apr 29, 2018
3830f25
The ChatViewController is now animatable
Sameesunkaria Apr 29, 2018
5aae24e
Structural changes
Sameesunkaria Apr 29, 2018
a93241b
removed todo comment
Sameesunkaria Apr 29, 2018
95f7fe4
Status bar now responds to preferred style correctly
Sameesunkaria Apr 29, 2018
a9f35d3
Preferences themed
Sameesunkaria Apr 29, 2018
060781f
Table view background corrected
Sameesunkaria Apr 30, 2018
ab7b337
Removed white background from custom emojis when used within messages
Sameesunkaria Apr 30, 2018
18acd37
Fixed status bar style for multiple windows
Sameesunkaria Apr 30, 2018
c8d8c70
New room view controller themed
Sameesunkaria Apr 30, 2018
6115f8f
Loader view themed
Sameesunkaria Apr 30, 2018
7e53e27
Chat header status view themed
Sameesunkaria Apr 30, 2018
7ec7a84
Preference controller added for changing theme
Sameesunkaria Apr 30, 2018
4892ee0
Fixed test
Sameesunkaria Apr 30, 2018
de44f2b
Search bar and add server vc fixed
Sameesunkaria May 1, 2018
4dc7c04
Refresh control themed correctly.
Sameesunkaria May 1, 2018
2f1a490
Minor refactoring
Sameesunkaria May 1, 2018
b4891db
Updated project file
Sameesunkaria May 1, 2018
d973d04
Memory cycle removed
Sameesunkaria May 1, 2018
fdc446b
Tests added
Sameesunkaria May 2, 2018
f6486fa
Audio player and Activity indicator themed correctly
Sameesunkaria May 2, 2018
b78c4fb
Fixed font coloring for markdown quotes
Sameesunkaria May 2, 2018
1bb6425
Theme refresh button removed from ChatViewController
Sameesunkaria May 2, 2018
3e29703
Merge upstream
Sameesunkaria May 3, 2018
937a110
SubscriptionsView removed
Sameesunkaria May 3, 2018
8423d68
Merge branch 'develop' into themeable-rc
Sameesunkaria May 3, 2018
edb133e
Merge issues fixed
Sameesunkaria May 3, 2018
9055539
Revert "Merge issues fixed"
Sameesunkaria May 3, 2018
96fe71a
Merge issues fixed
Sameesunkaria May 3, 2018
a4b7d95
Code cleanup
Sameesunkaria May 3, 2018
7739089
Checkmark moved to the right
Sameesunkaria May 3, 2018
46d1311
Merge Upstream
Sameesunkaria May 3, 2018
273930c
Merge branch 'develop' into themeable-rc
Sameesunkaria May 3, 2018
ae8cc40
Removed unused code and fixed a crash
Sameesunkaria May 3, 2018
964e85d
Drawing view fixed
Sameesunkaria May 4, 2018
72f2dc2
Fixed theming on the popover controllers
Sameesunkaria May 4, 2018
aab84d5
Removed unused code
Sameesunkaria May 4, 2018
954d216
Dark theme is now Darker
Sameesunkaria May 4, 2018
9d62771
Fix page controller dots getting colored
Sameesunkaria May 4, 2018
819b529
Merge branch 'develop' into themeable-rc
Sameesunkaria May 5, 2018
a823530
Removed the voodoo magic of swizzling for getting the correct status …
Sameesunkaria May 5, 2018
dd1d6e1
File view and audio controller themed
Sameesunkaria May 5, 2018
923f1df
Fixed text color on search bars and removed unused code
Sameesunkaria May 5, 2018
c9e73eb
Edit profile text color after editing fixed
Sameesunkaria May 5, 2018
a5c9f1a
Fixed separator dissappearing
Sameesunkaria May 5, 2018
0f01270
Fixed status bar color when notifications appear
Sameesunkaria May 5, 2018
d80eafc
Fixed the color on the typing indicator view
Sameesunkaria May 5, 2018
246ad46
Changed how the theme is applied to a table view cell
Sameesunkaria May 5, 2018
ab1d75b
Merge branch 'develop' into themeable-rc
Sameesunkaria May 7, 2018
fc2cebb
Audio controller background corrected
Sameesunkaria May 7, 2018
8285375
Themed message action views being added to slack text view
Sameesunkaria May 9, 2018
11bc1e4
Merged 'develop' into themeable-rc
Sameesunkaria May 9, 2018
94749b3
Merge branch 'develop' into themeable-rc
Sameesunkaria May 10, 2018
4642da6
Merge branch 'develop' into themeable-rc
Sameesunkaria May 12, 2018
b9beea5
Merge branch 'develop' into themeable-rc
Sameesunkaria May 15, 2018
b4e0824
Fix merge issues
Sameesunkaria May 17, 2018
2d60431
Merge branch 'develop' into themeable-rc
Sameesunkaria May 17, 2018
bd9bc82
Fix merge issues
Sameesunkaria May 17, 2018
7488a54
Merge branch 'develop' into themeable-rc
Sameesunkaria May 22, 2018
63a51dc
Added method descriptions.
Sameesunkaria May 22, 2018
754b0c6
Fixed access control issues
Sameesunkaria May 22, 2018
ad28f59
Merge branch 'develop' into themeable-rc
Sameesunkaria May 23, 2018
e4a5b04
Merge branch 'develop' into themeable-rc
Sameesunkaria May 29, 2018
21dd5e9
Project compiles again
Sameesunkaria May 29, 2018
8f5f85e
Fix merge issues
Sameesunkaria May 29, 2018
a6127de
Merge branch 'develop' into themeable-rc
Sameesunkaria May 30, 2018
565afb0
Theming nav bars
Sameesunkaria May 30, 2018
66390b4
Merge remote-tracking branch 'origin/themeable-rc' into themeable-rc
Sameesunkaria May 30, 2018
fb4bb73
Improved nav bar theming
Sameesunkaria May 30, 2018
699f5e3
Merge branch 'develop' into themeable-rc
Sameesunkaria May 30, 2018
7470bf4
Fix subscription cell background
Sameesunkaria May 30, 2018
2643c4d
Fixed the tint color on the server selector arrow
Sameesunkaria May 30, 2018
d27632d
Themed subscription cells
Sameesunkaria May 30, 2018
4cca758
Filter separator themed
Sameesunkaria May 30, 2018
021014b
Enabling notifications
Sameesunkaria May 31, 2018
d50d902
Server list view themed and some other minor changes
Sameesunkaria May 31, 2018
bee60c9
Channel info action glyphs themed
Sameesunkaria May 31, 2018
3a462f5
Set title color on the chat title view
Sameesunkaria May 31, 2018
f91d068
Merge branch 'develop' into themeable-rc
Sameesunkaria May 31, 2018
834bf24
Search bar tint corrected
Sameesunkaria May 31, 2018
5ce8dbb
Chat title view themed correctly
Sameesunkaria May 31, 2018
6dd2075
Text input bar themed
Sameesunkaria May 31, 2018
3c6e200
Scroll to bottom indicator themed
Sameesunkaria May 31, 2018
302eaca
Subtle changes to the theme colors
Sameesunkaria May 31, 2018
4374a7a
Removed TODOs
Sameesunkaria May 31, 2018
fc65a69
Removed the "Button" text that would appear in the nav bar when no ch…
Sameesunkaria May 31, 2018
67f4f50
Fix chat title view theming on the iPhone
Sameesunkaria May 31, 2018
9cd2d62
White background underneath the search bar fixed
Sameesunkaria May 31, 2018
8604a3c
Fix missing sort view separator
Sameesunkaria May 31, 2018
d86879d
Notification view explicitly marked not themeable
Sameesunkaria May 31, 2018
869dd22
Fixed edit profile view background
Sameesunkaria May 31, 2018
54f36fc
Chat day separator is now lighter
Sameesunkaria Jun 1, 2018
9ae59e5
Merge branch 'develop' into themeable-rc
Sameesunkaria Jun 1, 2018
238c805
Fixed an edge case for theming the search bar
Sameesunkaria Jun 1, 2018
be3fc5e
SplitVC separator themed
Sameesunkaria Jun 1, 2018
5f44874
Improved the theming of the split view controller separator
Sameesunkaria Jun 2, 2018
c1809bc
Themed chat preview mode view
Sameesunkaria Jun 2, 2018
3823f0f
Subscription vc selection background themed
Sameesunkaria Jun 3, 2018
485c722
Changed the color name to a more appropriate one
Sameesunkaria Jun 3, 2018
36ebcce
Merge branch 'develop' into themeable-rc
Sameesunkaria Jun 4, 2018
666e48d
Fix merge issues
Sameesunkaria Jun 4, 2018
4028a21
Refining colors
Sameesunkaria Jun 6, 2018
d56fefe
Notification view themed
Sameesunkaria Jun 6, 2018
81673c6
Fix search bar theme
Sameesunkaria Jun 6, 2018
47d6c22
Server list view header separator is no longer hidden
Sameesunkaria Jun 6, 2018
bf2f956
Merge branch 'develop' into themeable-rc
Sameesunkaria Jun 6, 2018
23850d0
Merge branch 'develop' into themeable-rc
Sameesunkaria Jun 7, 2018
444bea0
Removed theming from iOS 10 and below
Sameesunkaria Jun 9, 2018
dedd5c8
Removed theme preference from iOS 10
Sameesunkaria Jun 9, 2018
01a1ad0
Merge branch 'develop' into themeable-rc
Sameesunkaria Jun 11, 2018
189a24d
Fix merge issues
Sameesunkaria Jun 11, 2018
f1cc568
Fix merge issues
Sameesunkaria Jun 11, 2018
8871b0a
Subscriptions Sorting view themed
Sameesunkaria Jun 11, 2018
a0279af
Fix incorrectly themed components
Sameesunkaria Jun 11, 2018
2967c9b
Minor color fixes
Sameesunkaria Jun 11, 2018
85fa142
Using the checkmark accessory instead of a text field
Sameesunkaria Jun 11, 2018
73375f2
Theme applied to SubscriptionSectionView
Sameesunkaria Jun 11, 2018
5382781
Updated cocoapods
Sameesunkaria Jun 12, 2018
97f9302
Minor color fixes
Sameesunkaria Jun 12, 2018
42b42e3
Fix theme on StatusTableViewController
Sameesunkaria Jun 12, 2018
8835437
Added controlText color as a new grey color for text
Sameesunkaria Jun 13, 2018
3e19b63
Changed the detail text color for ServerInfoCell
Sameesunkaria Jun 13, 2018
263eb2c
Improve colors on the chat view controller
Sameesunkaria Jun 13, 2018
512f2c5
Merge branch 'develop' into themeable-rc
Sameesunkaria Jun 13, 2018
c9b9f0c
Merge develop
Sameesunkaria Jun 13, 2018
a57cc49
Scroll view indicators themed
Sameesunkaria Jun 13, 2018
13525ed
Fix tests
Sameesunkaria Jun 13, 2018
e327445
Fix minor theming issues
Sameesunkaria Jun 13, 2018
cbaa851
Merge branch 'develop' into themeable-rc
Sameesunkaria Jun 14, 2018
207aefa
Fix merge issues
Sameesunkaria Jun 14, 2018
4a49d75
Merge branch 'develop' into themeable-rc
Sameesunkaria Jun 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions Rocket.Chat.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Rocket.Chat/API/Clients/MessagesClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct MessagesClient: APIClient {
realm?.add(message, update: true)
}

MessageTextCacheManager.shared.update(for: message)
MessageTextCacheManager.shared.update(for: message, with: nil)
}
}

Expand Down
3 changes: 2 additions & 1 deletion Rocket.Chat/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import UserNotifications
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
var notificationWindow: UIWindow?
var notificationWindow: TransparentToTouchesWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Launcher().prepareToLaunch(with: launchOptions)
Expand Down Expand Up @@ -50,6 +50,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
notificationWindow?.rootViewController = NotificationViewController.shared
notificationWindow?.windowLevel = UIWindowLevelAlert
notificationWindow?.makeKeyAndVisible()
notificationWindow?.isHidden = true
}

// MARK: AppDelegate LifeCycle
Expand Down
30 changes: 26 additions & 4 deletions Rocket.Chat/Controllers/Base/BaseNavigationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,27 @@ class BaseNavigationController: UINavigationController {
return !(topViewController is WelcomeViewController)
}

override init(rootViewController: UIViewController) {
super.init(navigationBarClass: BaseNavigationBar.self, toolbarClass: nil)
self.setViewControllers([rootViewController], animated: false)
}

override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}

required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}

override func viewDidLoad() {
super.viewDidLoad()

view.backgroundColor = .white

let navBar = self.navigationBar
navBar.isTranslucent = false
navBar.tintColor = .RCBlue()
navBar.barTintColor = .RCNavigationBarColor()
(navBar as? BaseNavigationBar)?.themeSource = self
}

override func popToRootViewController(animated: Bool) -> [UIViewController]? {
Expand Down Expand Up @@ -56,30 +68,40 @@ class BaseNavigationController: UINavigationController {
}

func setTransparentTheme(forceRedraw: Bool = false) {
UIApplication.shared.statusBarStyle = .default
let navBar = self.navigationBar
navBar.barStyle = .default
navBar.setBackgroundImage(UIImage(), for: .default)
navBar.shadowImage = UIImage()
navBar.backgroundColor = UIColor.clear
navBar.isTranslucent = true
navBar.tintColor = .RCBlue()
if forceRedraw { forceNavigationToRedraw() }
navBar.applyTheme()
setNeedsStatusBarAppearanceUpdate()
}

func setGrayTheme(forceRedraw: Bool = false) {
UIApplication.shared.statusBarStyle = .lightContent
let navBar = self.navigationBar
navBar.barStyle = .black
navBar.shadowImage = UIImage()
navBar.backgroundColor = .RCNavBarGray()
navBar.barTintColor = .RCNavBarGray()
navBar.isTranslucent = false
navBar.tintColor = .white
navBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.white]
if forceRedraw { forceNavigationToRedraw() }
navBar.applyTheme()
setNeedsStatusBarAppearanceUpdate()
}

func forceNavigationToRedraw() {
isNavigationBarHidden = true
isNavigationBarHidden = false
}
}

extension BaseNavigationController: BaseNavigationBarThemeSource {
var navgiationBarTheme: Theme? {
return topViewController?.view.theme
}
}
2 changes: 2 additions & 0 deletions Rocket.Chat/Controllers/Base/BaseTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class BaseTableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()

ThemeManager.addObserver(self)

self.navigationItem.backBarButtonItem = UIBarButtonItem(
title: "",
style: .plain,
Expand Down
4 changes: 3 additions & 1 deletion Rocket.Chat/Controllers/Base/BaseViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class BaseViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

self.navigationItem.backBarButtonItem = UIBarButtonItem(
ThemeManager.addObserver(self)

navigationItem.backBarButtonItem = UIBarButtonItem(
title: "",
style: .plain,
target: nil,
Expand Down
20 changes: 20 additions & 0 deletions Rocket.Chat/Controllers/Base/MainSplitViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,23 @@ final class MainSplitViewController: UISplitViewController {
override func awakeFromNib() {
super.awakeFromNib()

ThemeManager.addObserver(self)

delegate = self
preferredDisplayMode = .allVisible

SocketManager.addConnectionHandler(token: socketHandlerToken, handler: self)
SocketManager.reconnect()
}

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
applyTheme()
}

override var preferredStatusBarStyle: UIStatusBarStyle {
return view.theme?.appearence.statusBarStyle ?? .default
}
}

// MARK: UISplitViewControllerDelegate
Expand All @@ -72,3 +82,13 @@ extension MainSplitViewController: SocketConnectionHandler {
}

}

// MARK: Themeable

extension MainSplitViewController {
override func applyTheme() {
guard let theme = view.theme else { return }
view.backgroundColor = theme.mutedAccent
view.subviews.first?.backgroundColor = theme.mutedAccent
}
}
Loading