mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 02:43:38 +00:00
Fix message spacing
This commit is contained in:
parent
5936c16c47
commit
2249bf1edb
@ -88,6 +88,7 @@ import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import org.thoughtcrime.securesms.loki.FriendRequestView;
|
||||
import org.thoughtcrime.securesms.loki.FriendRequestViewDelegate;
|
||||
import org.thoughtcrime.securesms.loki.LokiMessageFriendRequestDatabase;
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
||||
import org.thoughtcrime.securesms.mms.ImageSlide;
|
||||
import org.thoughtcrime.securesms.mms.PartAuthority;
|
||||
@ -977,6 +978,14 @@ public class ConversationItem extends LinearLayout
|
||||
int spacingTop = readDimen(context, R.dimen.conversation_vertical_message_spacing_collapse);
|
||||
int spacingBottom = spacingTop;
|
||||
|
||||
boolean isOutgoingStack = current.isOutgoing() && previous.orNull() != null && previous.get().isOutgoing();
|
||||
LokiMessageFriendRequestDatabase friendRequestDatabase = DatabaseFactory.getLokiMessageFriendRequestDatabase(context);
|
||||
boolean isPreviousMessageFriendRequest = previous.orNull() != null && friendRequestDatabase.isFriendRequest(previous.get().id);
|
||||
|
||||
if (isOutgoingStack && isPreviousMessageFriendRequest) {
|
||||
spacingTop = readDimen(context, R.dimen.conversation_vertical_message_spacing_default);
|
||||
}
|
||||
|
||||
if (isStartOfMessageCluster(current, previous, isGroupThread)) {
|
||||
spacingTop = readDimen(context, R.dimen.conversation_vertical_message_spacing_default);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user