mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 13:48:26 +00:00
Fixed off-by-one crash when navigating to message from FTS.
Related to #8145
This commit is contained in:
parent
da60cac833
commit
a1b2887bf3
@ -465,7 +465,7 @@ public class ConversationFragment extends Fragment
|
|||||||
|
|
||||||
int limit = args.getInt(KEY_LIMIT, PARTIAL_CONVERSATION_LIMIT);
|
int limit = args.getInt(KEY_LIMIT, PARTIAL_CONVERSATION_LIMIT);
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
if (limit != 0 && startingPosition > limit) {
|
if (limit != 0 && startingPosition >= limit) {
|
||||||
offset = Math.max(startingPosition - (limit / 2) + 1, 0);
|
offset = Math.max(startingPosition - (limit / 2) + 1, 0);
|
||||||
startingPosition -= offset - 1;
|
startingPosition -= offset - 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user