mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Performance tweak
This commit is contained in:
@@ -79,8 +79,9 @@ public class DcMsg {
|
||||
public static int getMessagePosition(DcMsg msg, ApplicationDcContext dcContext) {
|
||||
int msgs[] = dcContext.getChatMsgs(msg.getChatId(), 0, 0);
|
||||
int startingPosition = -1;
|
||||
int msgId = msg.getId();
|
||||
for(int i=0; i< msgs.length; i++ ) {
|
||||
if(msgs[i] == msg.getId()) {
|
||||
if(msgs[i] == msgId) {
|
||||
startingPosition = msgs.length-1-i;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user