mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 09:13:39 +00:00
Fix crash & undo debugging setup
This commit is contained in:
parent
c8cc22e8fe
commit
c47be74f0d
@ -19,6 +19,7 @@ package org.thoughtcrime.securesms;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.conversation.ConversationActivity;
|
import org.thoughtcrime.securesms.conversation.ConversationActivity;
|
||||||
import org.thoughtcrime.securesms.database.Address;
|
import org.thoughtcrime.securesms.database.Address;
|
||||||
@ -49,10 +50,10 @@ public class NewConversationActivity extends ContactSelectionActivity {
|
|||||||
public void onContactSelected(String number) {
|
public void onContactSelected(String number) {
|
||||||
boolean isValid = PublicKeyValidation.isValid(number);
|
boolean isValid = PublicKeyValidation.isValid(number);
|
||||||
|
|
||||||
// if (!isValid) {
|
if (!isValid) {
|
||||||
// Toast.makeText(this, R.string.activity_new_conversation_invalid_public_key_message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, R.string.activity_new_conversation_invalid_public_key_message, Toast.LENGTH_SHORT).show();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
Recipient recipient = Recipient.from(this, Address.fromSerialized(number), true);
|
Recipient recipient = Recipient.from(this, Address.fromSerialized(number), true);
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ public class DatabaseFactory {
|
|||||||
this.searchDatabase = new SearchDatabase(context, databaseHelper);
|
this.searchDatabase = new SearchDatabase(context, databaseHelper);
|
||||||
this.jobDatabase = new JobDatabase(context, databaseHelper);
|
this.jobDatabase = new JobDatabase(context, databaseHelper);
|
||||||
|
|
||||||
this.lokiAPIDatabase = new LokiAPIDatabase(TextSecurePreferences.getLocalNumber(context), context, databaseHelper);
|
this.lokiAPIDatabase = new LokiAPIDatabase(context, databaseHelper);
|
||||||
this.lokiContactPreKeyDatabase = new LokiContactPreKeyDatabase(context, databaseHelper);
|
this.lokiContactPreKeyDatabase = new LokiContactPreKeyDatabase(context, databaseHelper);
|
||||||
this.lokiPreKeyBundleDatabase = new LokiPreKeyBundleDatabase(context, databaseHelper);
|
this.lokiPreKeyBundleDatabase = new LokiPreKeyBundleDatabase(context, databaseHelper);
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,13 @@ import android.content.ContentValues
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.thoughtcrime.securesms.database.Database
|
import org.thoughtcrime.securesms.database.Database
|
||||||
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper
|
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper
|
||||||
|
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||||
import org.whispersystems.signalservice.loki.api.LokiAPIDatabaseProtocol
|
import org.whispersystems.signalservice.loki.api.LokiAPIDatabaseProtocol
|
||||||
import org.whispersystems.signalservice.loki.api.LokiAPITarget
|
import org.whispersystems.signalservice.loki.api.LokiAPITarget
|
||||||
|
|
||||||
class LokiAPIDatabase(private val userPublicKey: String, context: Context, helper: SQLCipherOpenHelper) : Database(context, helper), LokiAPIDatabaseProtocol {
|
class LokiAPIDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper), LokiAPIDatabaseProtocol {
|
||||||
|
|
||||||
|
private val userPublicKey get() = TextSecurePreferences.getLocalNumber(context)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
// Swarm cache
|
// Swarm cache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user