mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
Merge pull request #226 from Aga-C/fix-loading-messages
Fixed constant loading messages text (#225)
This commit is contained in:
@@ -251,8 +251,8 @@ class MainActivity : SimpleActivity() {
|
|||||||
.thenByDescending { it.date }
|
.thenByDescending { it.date }
|
||||||
).toMutableList() as ArrayList<Conversation>
|
).toMutableList() as ArrayList<Conversation>
|
||||||
conversations_list.beVisibleIf(hasConversations)
|
conversations_list.beVisibleIf(hasConversations)
|
||||||
no_conversations_placeholder.beVisibleIf(!hasConversations)
|
no_conversations_placeholder.beGoneIf(hasConversations)
|
||||||
no_conversations_placeholder_2.beVisibleIf(!hasConversations)
|
no_conversations_placeholder_2.beGoneIf(hasConversations)
|
||||||
|
|
||||||
if (!hasConversations && config.appRunCount == 1) {
|
if (!hasConversations && config.appRunCount == 1) {
|
||||||
no_conversations_placeholder.text = getString(R.string.loading_messages)
|
no_conversations_placeholder.text = getString(R.string.loading_messages)
|
||||||
@@ -279,6 +279,12 @@ class MainActivity : SimpleActivity() {
|
|||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
(currAdapter as ConversationsAdapter).updateConversations(sortedConversations)
|
(currAdapter as ConversationsAdapter).updateConversations(sortedConversations)
|
||||||
|
if (currAdapter.conversations.isEmpty()) {
|
||||||
|
conversations_list.beGone()
|
||||||
|
no_conversations_placeholder.text = getString(R.string.no_conversations_found)
|
||||||
|
no_conversations_placeholder.beVisible()
|
||||||
|
no_conversations_placeholder_2.beVisible()
|
||||||
|
}
|
||||||
} catch (ignored: Exception) {
|
} catch (ignored: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user