@ -378,12 +378,10 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
- ( void ) checkIfEmptyView {
- ( void ) checkIfEmptyView {
[ _tableView setHidden : NO ] ;
[ _tableView setHidden : NO ] ;
if ( self . viewingThreadsIn == kInboxState && [ self . threadMappings numberOfItemsInGroup : TSInboxGroup ] == 0 ) {
if ( self . viewingThreadsIn == kInboxState && [ self . threadMappings numberOfItemsInGroup : TSInboxGroup ] == 0 ) {
_emptyBoxImage . image = [ UIImage imageNamed : @ "uiEmptyInbox "] ;
[ self setEmptyBoxText ] ;
[ self setEmptyBoxText ] ;
[ _tableView setHidden : YES ] ;
[ _tableView setHidden : YES ] ;
}
}
else if ( self . viewingThreadsIn == kArchiveState && [ self . threadMappings numberOfItemsInGroup : TSArchiveGroup ] == 0 ) {
else if ( self . viewingThreadsIn == kArchiveState && [ self . threadMappings numberOfItemsInGroup : TSArchiveGroup ] == 0 ) {
_emptyBoxImage . image = [ UIImage imageNamed : @ "uiEmptyArchive "] ;
[ self setEmptyBoxText ] ;
[ self setEmptyBoxText ] ;
[ _tableView setHidden : YES ] ;
[ _tableView setHidden : YES ] ;
}
}
@ -399,13 +397,28 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
NSString * secondLine = @ "";
NSString * secondLine = @ "";
if ( self . viewingThreadsIn == kInboxState ) {
if ( self . viewingThreadsIn == kInboxState ) {
/ / Check if this is the first launch
if ( [ Environment . preferences getHasSentAMessage ] ) {
firstLine = @ "No Messages : ( ";
_emptyBoxImage . image = nil ;
secondLine = @ "Tap compose to send a message or invite a friend to Signal . ";
firstLine = @ "Done . Done . Done . ";
secondLine = @ "Tip : add a conversation as a reminder !";
}
else {
_emptyBoxImage . image = [ UIImage imageNamed : @ "uiEmptyInbox "] ;
firstLine = @ "Start your first Signal conversation !";
secondLine = @ "Tap on the + button . ";
}
}
}
else {
else {
firstLine = @ "No archived messages . ";
if ( [ Environment . preferences getHasArchivedAMessage ] ) {
secondLine = @ "Swipe right on any message in your inbox and archive it here . ";
_emptyBoxImage . image = nil ;
firstLine = @ "Squeaky Freaking Clean . ";
secondLine = @ "None . Zero . Zilch . Nada . ";
}
else {
_emptyBoxImage . image = [ UIImage imageNamed : @ "uiEmptyArchive "] ;
firstLine = @ "Save conversations for reference . ";
secondLine = @ "You can swipe conversations into your Archive from the Inbox . ";
}
}
}
NSMutableAttributedString * fullLabelString = [ [ NSMutableAttributedString alloc ] initWithString : [ NSString stringWithFormat : @ "%@\n%@",firstLine,secondLine]];
NSMutableAttributedString * fullLabelString = [ [ NSMutableAttributedString alloc ] initWithString : [ NSString stringWithFormat : @ "%@\n%@",firstLine,secondLine]];