mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
parent
d543c0b36e
commit
92422a939a
@ -198,9 +198,9 @@ public class ThreadDatabase extends Database {
|
||||
try {
|
||||
cursor = DatabaseFactory.getMmsSmsDatabase(context).getConversation(threadId);
|
||||
|
||||
if (cursor != null && cursor.getCount() > length) {
|
||||
if (cursor != null && length > 0 && cursor.getCount() > length) {
|
||||
Log.w("ThreadDatabase", "Cursor count is greater than length!");
|
||||
cursor.moveToPosition(cursor.getCount() - length);
|
||||
cursor.moveToPosition(length - 1);
|
||||
|
||||
long lastTweetDate = cursor.getLong(cursor.getColumnIndexOrThrow(MmsSmsColumns.NORMALIZED_DATE_RECEIVED));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user