mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Fix ugly spacing
This commit is contained in:
parent
eae5e90814
commit
2c35ed2177
@ -15,7 +15,7 @@
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp">
|
||||
android:layout_marginEnd="16dp">
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
android:id="@+id/profile_name"
|
||||
|
@ -24,7 +24,6 @@ import android.database.MergeCursor;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
@ -40,6 +39,7 @@ import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord;
|
||||
import org.thoughtcrime.securesms.database.model.MessageRecord;
|
||||
import org.thoughtcrime.securesms.database.model.MmsMessageRecord;
|
||||
import org.thoughtcrime.securesms.database.model.ThreadRecord;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import org.thoughtcrime.securesms.mms.Slide;
|
||||
import org.thoughtcrime.securesms.mms.SlideDeck;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
@ -78,9 +78,7 @@ public class ThreadDatabase extends Database {
|
||||
public static final String EXPIRES_IN = "expires_in";
|
||||
public static final String LAST_SEEN = "last_seen";
|
||||
private static final String HAS_SENT = "has_sent";
|
||||
|
||||
// Loki
|
||||
private static final String FRIEND_REQUEST_STATUS = "friend_request_status";
|
||||
private static final String FRIEND_REQUEST_STATUS = "friend_request_status"; // Loki
|
||||
|
||||
public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" +
|
||||
ID + " INTEGER PRIMARY KEY, " + DATE + " INTEGER DEFAULT 0, " +
|
||||
@ -672,7 +670,7 @@ public class ThreadDatabase extends Database {
|
||||
public static class LokiFriendRequestStatus {
|
||||
// New conversation; no messages sent or received.
|
||||
public static final int NONE = 0;
|
||||
// This state is used to lock the input early while sending
|
||||
// This state is used to lock the input early while sending.
|
||||
public static final int REQUEST_SENDING = 1;
|
||||
// Friend request sent; awaiting response.
|
||||
public static final int REQUEST_SENT = 2;
|
||||
|
@ -136,8 +136,8 @@ public class SignalCommunicationModule {
|
||||
Optional.fromNullable(IncomingMessageObserver.getUnidentifiedPipe()),
|
||||
Optional.of(new SecurityEventListener(context)));
|
||||
|
||||
// LOKI - Set the prekey bundle store
|
||||
// This is something that we MUST have otherwise our loki logic will fail
|
||||
// Loki - Set the pre key bundle store
|
||||
// This is something that we MUST have or our Loki logic will fail
|
||||
this.messageSender.setPreKeyBundleStore(new LokiPreKeyBundleStore(context));
|
||||
} else {
|
||||
this.messageSender.setMessagePipe(IncomingMessageObserver.getPipe(), IncomingMessageObserver.getUnidentifiedPipe());
|
||||
|
@ -815,15 +815,12 @@ public class PushDecryptJob extends BaseJob {
|
||||
}
|
||||
}
|
||||
|
||||
private void handleFriendRequestIfNeeded(@NonNull SignalServiceEnvelope envelope,
|
||||
@NonNull SignalServiceContent content,
|
||||
@NonNull SignalServiceDataMessage message) {
|
||||
private void handleFriendRequestIfNeeded(@NonNull SignalServiceEnvelope envelope, @NonNull SignalServiceContent content, @NonNull SignalServiceDataMessage message) {
|
||||
|
||||
Recipient recipient = getMessageDestination(content, message);
|
||||
ThreadDatabase database = DatabaseFactory.getThreadDatabase(context);
|
||||
long threadId = database.getThreadIdIfExistsFor(recipient);
|
||||
int friendRequestStatus = database.getFriendRequestStatus(threadId);
|
||||
|
||||
if (envelope.isFriendRequest()) {
|
||||
if (friendRequestStatus == ThreadDatabase.LokiFriendRequestStatus.REQUEST_SENT) {
|
||||
// This can happen if Alice sent Bob a friend request, Bob declined, but then Bob changed his
|
||||
@ -850,7 +847,6 @@ public class PushDecryptJob extends BaseJob {
|
||||
// If the thread's friend request status is not `FRIENDS`, but we're receiving a message,
|
||||
// it must be a friend request accepted message. Declining a friend request doesn't send a message.
|
||||
database.setFriendRequestStatus(threadId, ThreadDatabase.LokiFriendRequestStatus.FRIENDS);
|
||||
|
||||
// TODO: Send p2p details here
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user