Fix crash

This commit is contained in:
nielsandriesse 2020-06-03 11:52:30 +10:00
parent e7a7d00f25
commit 6a12517105

View File

@ -67,7 +67,6 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) { override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady) super.onCreate(savedInstanceState, isReady)
IP2Country.configureIfNeeded(this)
// Process any outstanding deletes // Process any outstanding deletes
val threadDatabase = DatabaseFactory.getThreadDatabase(this) val threadDatabase = DatabaseFactory.getThreadDatabase(this)
val archivedConversationCount = threadDatabase.archivedConversationListCount val archivedConversationCount = threadDatabase.archivedConversationListCount
@ -168,6 +167,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
} }
SessionManagementProtocol.configureIfNeeded(sessionResetImpl, threadDB, application) SessionManagementProtocol.configureIfNeeded(sessionResetImpl, threadDB, application)
MultiDeviceProtocol.configureIfNeeded(apiDB) MultiDeviceProtocol.configureIfNeeded(apiDB)
IP2Country.configureIfNeeded(this)
// TODO: Temporary hack to unbork existing clients // TODO: Temporary hack to unbork existing clients
val allContacts = DatabaseFactory.getRecipientDatabase(this).allAddresses.map { val allContacts = DatabaseFactory.getRecipientDatabase(this).allAddresses.map {
MultiDeviceProtocol.shared.getMasterDevice(it.serialize()) ?: it.serialize() MultiDeviceProtocol.shared.getMasterDevice(it.serialize()) ?: it.serialize()