mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-27 03:12:18 -05:00
Cannot add messages to adapter in a differen thread
This commit is contained in:
parent
e0793a3bfa
commit
926bd9168a
@ -140,17 +140,13 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fill view with messages that have been buffered while paused
|
// Fill view with messages that have been buffered while paused
|
||||||
new Thread() {
|
for (Conversation conversation : server.getConversations()) {
|
||||||
public void run() {
|
while (conversation.hasBufferedMessages()) {
|
||||||
for (Conversation conversation : server.getConversations()) {
|
if (conversation.getMessageListAdapter() != null) {
|
||||||
while (conversation.hasBufferedMessages()) {
|
conversation.getMessageListAdapter().addMessage(conversation.pollBufferedMessage());
|
||||||
if (conversation.getMessageListAdapter() != null) {
|
|
||||||
conversation.getMessageListAdapter().addMessage(conversation.pollBufferedMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.start();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user