From fc9971fa1519464eab1dfa4fa846d8ce02eb15a4 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 23 Mar 2019 00:42:23 +0100 Subject: [PATCH] reduce size of location markers that don't have a messageId --- src/org/thoughtcrime/securesms/map/MapDataManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/map/MapDataManager.java b/src/org/thoughtcrime/securesms/map/MapDataManager.java index 7a563d68b..9b064c7e5 100644 --- a/src/org/thoughtcrime/securesms/map/MapDataManager.java +++ b/src/org/thoughtcrime/securesms/map/MapDataManager.java @@ -303,7 +303,10 @@ public class MapDataManager implements DcEventCenter.DcEventDelegate, GenerateIn mapboxStyle.addImage(source.getMarkerIcon(), generateColoredLocationIcon(source.getColorArgb())); - Expression markerSize = switchCase(toBool(get(MARKER_SELECTED)), literal(1.5f), literal(1.0f)); + Expression markerSize = + switchCase(toBool(get(MARKER_SELECTED)), literal(1.5f), + switchCase(toBool(get(LAST_LOCATION)), literal(1.0f), + switchCase(eq(get(MESSAGE_ID), literal(0)), literal(0.7f), literal(1.1f)))); Expression markerIcon = switchCase(toBool(get(LAST_LOCATION)), literal(source.getMarkerLastPositon()), literal(source.getMarkerIcon())); Expression allowOverlap = eq(get(LAST_LOCATION), literal(true)); mapboxStyle.addLayer(new SymbolLayer(source.getMarkerLayer(), source.getMarkerSource()) @@ -317,6 +320,7 @@ public class MapDataManager implements DcEventCenter.DcEventDelegate, GenerateIn .withProperties(PropertyFactory.lineCap(Property.LINE_CAP_ROUND), PropertyFactory.lineJoin(Property.LINE_JOIN_ROUND), PropertyFactory.lineWidth(3f), + PropertyFactory.lineOpacity(0.5f), PropertyFactory.lineColor(source.getColorArgb()))); Expression filterInfoWindow = eq((get(MARKER_SELECTED)), literal(true));