Fixed off-by-one crash when navigating to message from FTS.

Related to #8145
This commit is contained in:
Greyson Parrelli 2018-08-28 11:52:26 -07:00
parent da60cac833
commit a1b2887bf3

View File

@ -465,7 +465,7 @@ public class ConversationFragment extends Fragment
int limit = args.getInt(KEY_LIMIT, PARTIAL_CONVERSATION_LIMIT);
int offset = 0;
if (limit != 0 && startingPosition > limit) {
if (limit != 0 && startingPosition >= limit) {
offset = Math.max(startingPosition - (limit / 2) + 1, 0);
startingPosition -= offset - 1;
}