Add possible fixes for the ‘empty home view’ issue.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-07-14 13:20:00 -04:00
parent 5e58079e13
commit 3f805cd4cd
1 changed files with 12 additions and 1 deletions

View File

@ -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];