From 57647c9fcea455a1b133f4b7d39756db53e3f721 Mon Sep 17 00:00:00 2001 From: Rafael Kellermann Streit Date: Sun, 24 Sep 2017 11:10:16 -0300 Subject: [PATCH] Update titleView data from subscription when we have some update in DB --- .../Subscriptions/SubscriptionsViewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Rocket.Chat/Controllers/Subscriptions/SubscriptionsViewController.swift b/Rocket.Chat/Controllers/Subscriptions/SubscriptionsViewController.swift index e5d142f29f..0fe233abc7 100644 --- a/Rocket.Chat/Controllers/Subscriptions/SubscriptionsViewController.swift +++ b/Rocket.Chat/Controllers/Subscriptions/SubscriptionsViewController.swift @@ -241,6 +241,13 @@ extension SubscriptionsViewController { updateCurrentUserInformation() SubscriptionManager.updateUnreadApplicationBadge() + // Update titleView information with subscription, can be + // some status changes + if let subscription = ChatViewController.shared?.subscription { + ChatViewController.shared?.chatTitleView?.subscription = subscription + } + + // If side panel is visible, reload the data if MainChatViewController.shared?.sidePanelVisible ?? false { tableView?.reloadData() }