runOnUiThread new Runnable Override public void run for int messages s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
runOnUiThread(new Runnable() {
@Override
public void run() {
for (int i = 0; i < messages.size() - 1; i++) {
com.perm.kate.api.Message message = messages.get(i);
String ava = x.get(0).photo;
refreshUpdates(2, message.uid, message.mid, message.body, "test", message.read_state, account.user_id != message.uid, 1, 1, 0L, ava);
}
}
});
/// ...
private void refreshUpdates(long id, long uid, long mid, String title, String body, boolean read_state, boolean is_out, long chat_id, long admin_id, long time, String photo) {
msgs.add(new Message(id, uid, mid, title, body, read_state, is_out, chat_id, admin_id, time, photo));
}