diff --git a/res/drawable/ic_outline_photo_camera_24.xml b/res/drawable/ic_outline_photo_camera_24.xml index 58dee806f9..59e933eea1 100644 --- a/res/drawable/ic_outline_photo_camera_24.xml +++ b/res/drawable/ic_outline_photo_camera_24.xml @@ -3,13 +3,11 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" - android:tint="?attr/colorControlNormal"> + android:tint="?android:colorControlNormal"> + android:pathData="M8.8496,2.2148L8.627,2.459L7.1289,4.0938L4.4805,4.0938C3.0376,4.0938 1.8496,5.28 1.8496,6.7227L1.8496,17.9961C1.8496,19.4388 3.0376,20.625 4.4805,20.625L19.5195,20.625C20.9624,20.625 22.1504,19.4388 22.1504,17.9961L22.1504,6.7227C22.1504,5.28 20.9624,4.0938 19.5195,4.0938L16.8711,4.0938L15.1504,2.2148L8.8496,2.2148zM9.5098,3.7148L14.4902,3.7148L16.2109,5.5938L19.5195,5.5938C20.1447,5.5938 20.6504,6.0987 20.6504,6.7227L20.6504,17.9961C20.6504,18.6201 20.1447,19.125 19.5195,19.125L4.4805,19.125C3.8553,19.125 3.3496,18.62 3.3496,17.9961L3.3496,6.7227C3.3496,6.0987 3.8553,5.5938 4.4805,5.5938L7.7891,5.5938L9.5098,3.7148z" + android:fillColor="#000000"/> + android:pathData="M12,7.4648C9.2499,7.4648 7.0039,9.7109 7.0039,12.4609C7.0039,15.211 9.2499,17.457 12,17.457C14.7501,17.457 16.9961,15.211 16.9961,12.4609C16.9961,9.7109 14.7501,7.4648 12,7.4648zM12,8.9648C13.9394,8.9648 15.4961,10.5215 15.4961,12.4609C15.4961,14.4003 13.9394,15.957 12,15.957C10.0606,15.957 8.5039,14.4003 8.5039,12.4609C8.5039,10.5215 10.0606,8.9648 12,8.9648z" + android:fillColor="#000000"/> diff --git a/src/org/thoughtcrime/securesms/loki/api/PublicChatPoller.kt b/src/org/thoughtcrime/securesms/loki/api/PublicChatPoller.kt index 80b52c533e..443cc84a59 100644 --- a/src/org/thoughtcrime/securesms/loki/api/PublicChatPoller.kt +++ b/src/org/thoughtcrime/securesms/loki/api/PublicChatPoller.kt @@ -186,6 +186,12 @@ class PublicChatPoller(private val context: Context, private val group: PublicCh } fun processOutgoingMessage(message: PublicChatMessage) { val messageServerID = message.serverID ?: return + val messageID = DatabaseFactory.getLokiMessageDatabase(context).getMessageID(messageServerID) + var isDuplicate = false + if (messageID != null) { + isDuplicate = DatabaseFactory.getMmsDatabase(context).getThreadIdForMessage(messageID) > 0 || DatabaseFactory.getSmsDatabase(context).getThreadIdForMessage(messageID) > 0 + } + if (isDuplicate) { return } if (message.body.isEmpty() && message.attachments.isEmpty() && message.quote == null) { return } val userHexEncodedPublicKey = TextSecurePreferences.getLocalNumber(context) val dataMessage = getDataMessage(message) diff --git a/src/org/thoughtcrime/securesms/util/MediaUtil.java b/src/org/thoughtcrime/securesms/util/MediaUtil.java index 6163ba16d6..6278073fd0 100644 --- a/src/org/thoughtcrime/securesms/util/MediaUtil.java +++ b/src/org/thoughtcrime/securesms/util/MediaUtil.java @@ -226,7 +226,9 @@ public class MediaUtil { } public static boolean isImageType(String contentType) { - return (null != contentType) && contentType.startsWith("image/"); + return (null != contentType) + && contentType.startsWith("image/") + && !contentType.contains("svg"); // Do not treat SVGs as regular images. } public static boolean isAudioType(String contentType) {