From a978253e006742f792cea0ad7ae8d6e8e8ad689f Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 21 Oct 2019 15:26:57 +1100 Subject: [PATCH] Fix indentation --- res/layout/attachment_type_selector.xml | 217 +++++++++--------- .../securesms/loki/LokiPublicChatPoller.kt | 9 +- 2 files changed, 118 insertions(+), 108 deletions(-) diff --git a/res/layout/attachment_type_selector.xml b/res/layout/attachment_type_selector.xml index 31bdb96240..212cbf9daf 100644 --- a/res/layout/attachment_type_selector.xml +++ b/res/layout/attachment_type_selector.xml @@ -1,54 +1,59 @@ + - + - - - + + + + + - - - - + android:layout_height="wrap_content" + android:layout_weight="1" + android:gravity="center" + android:orientation="vertical"> + android:id="@+id/gallery_button" + android:layout_width="53dp" + android:layout_height="53dp" + android:src="@drawable/ic_image_white_24dp" + android:scaleType="center" + android:contentDescription="@string/attachment_type_selector__gallery_description" + app:circleColor="@color/purple_400"/> - + @@ -128,40 +133,43 @@ - + + android:id="@+id/contact_button" + android:layout_width="53dp" + android:layout_height="53dp" + android:src="@drawable/ic_person_white_24dp" + android:scaleType="center" + android:contentDescription="@string/attachment_type_selector__contact_description" + app:circleColor="@color/blue_400"/> - + - + - + + android:id="@+id/giphy_button" + android:layout_width="53dp" + android:layout_height="53dp" + android:src="@drawable/ic_gif_white_24dp" + android:scaleType="center" + android:contentDescription="@string/attachment_type_selector__gif_description" + app:circleColor="@color/cyan_400"/> - + - + + android:id="@+id/close_button" + android:layout_width="53dp" + android:layout_height="53dp" + android:src="@drawable/ic_keyboard_arrow_down_white_24dp" + android:scaleType="center" + android:contentDescription="@string/attachment_type_selector__drawer_description" + app:circleColor="@color/gray50"/> - + - diff --git a/src/org/thoughtcrime/securesms/loki/LokiPublicChatPoller.kt b/src/org/thoughtcrime/securesms/loki/LokiPublicChatPoller.kt index 98e6e8d1dd..5cd1b4c95c 100644 --- a/src/org/thoughtcrime/securesms/loki/LokiPublicChatPoller.kt +++ b/src/org/thoughtcrime/securesms/loki/LokiPublicChatPoller.kt @@ -17,9 +17,11 @@ import org.thoughtcrime.securesms.util.GroupUtil import org.thoughtcrime.securesms.util.TextSecurePreferences import org.thoughtcrime.securesms.util.Util import org.whispersystems.libsignal.util.guava.Optional -import org.whispersystems.signalservice.api.messages.* +import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentPointer +import org.whispersystems.signalservice.api.messages.SignalServiceContent +import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage +import org.whispersystems.signalservice.api.messages.SignalServiceGroup import org.whispersystems.signalservice.api.push.SignalServiceAddress -import org.whispersystems.signalservice.internal.push.SignalServiceProtos import org.whispersystems.signalservice.loki.api.LokiPublicChat import org.whispersystems.signalservice.loki.api.LokiPublicChatAPI import org.whispersystems.signalservice.loki.api.LokiPublicChatMessage @@ -131,10 +133,7 @@ class LokiPublicChatPoller(private val context: Context, private val group: Loki val lokiMessageDatabase = DatabaseFactory.getLokiMessageDatabase(context) val isDuplicate = lokiMessageDatabase.getMessageID(messageServerID) != null if (isDuplicate) { return } - - // Ignore empty messages with no attachments or quotes if (message.body.isEmpty() && message.attachments.isEmpty() && message.quote == null) { return } - val id = group.id.toByteArray() val mmsDatabase = DatabaseFactory.getMmsDatabase(context) val recipient = Recipient.from(context, Address.fromSerialized(GroupUtil.getEncodedId(id, false)), false)