From 3f805cd4cd0406e6d70bf2092ef13927e681b6fd Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 14 Jul 2017 13:20:00 -0400 Subject: [PATCH] =?UTF-8?q?Add=20possible=20fixes=20for=20the=20=E2=80=98e?= =?UTF-8?q?mpty=20home=20view=E2=80=99=20issue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/ViewControllers/SignalsViewController.m | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Signal/src/ViewControllers/SignalsViewController.m b/Signal/src/ViewControllers/SignalsViewController.m index 9311f50f4..a8cf33d44 100644 --- a/Signal/src/ViewControllers/SignalsViewController.m +++ b/Signal/src/ViewControllers/SignalsViewController.m @@ -364,7 +364,6 @@ [self updateInboxCountLabel]; self.isViewVisible = YES; - [self checkIfEmptyView]; // When returning to home view, try to ensure that the "last" thread is still // visible. The threads often change ordering while in conversation view due @@ -384,6 +383,8 @@ animated:NO]; } } + + [self checkIfEmptyView]; } - (void)viewWillDisappear:(BOOL)animated @@ -438,6 +439,8 @@ } else { [[NSNotificationCenter defaultCenter] removeObserver:self name:YapDatabaseModifiedNotification object:nil]; } + + [self checkIfEmptyView]; } - (void)applicationWillEnterForeground:(NSNotification *)notification @@ -846,6 +849,7 @@ [self updateInboxCountLabel]; if ([sectionChanges count] == 0 && [rowChanges count] == 0) { + [self checkIfEmptyView]; return; } @@ -902,6 +906,13 @@ [self checkIfEmptyView]; } +- (void)setViewingThreadsIn:(CellState)viewingThreadsIn +{ + _viewingThreadsIn = viewingThreadsIn; + + [self checkIfEmptyView]; +} + - (void)checkIfEmptyView { [_tableView setHidden:NO]; [_emptyBoxLabel setHidden:NO];