Update for core changes & refactor
parent
d99a996d0e
commit
b58fce3a68
@ -1,13 +0,0 @@
|
||||
package org.thoughtcrime.securesms.loki
|
||||
|
||||
enum class LokiMessageFriendRequestStatus(val rawValue: Int) {
|
||||
NONE(0),
|
||||
REQUEST_SENDING_OR_FAILED(1),
|
||||
/**
|
||||
* Either sent or received.
|
||||
*/
|
||||
REQUEST_PENDING(2),
|
||||
REQUEST_ACCEPTED(3),
|
||||
REQUEST_REJECTED(4),
|
||||
REQUEST_EXPIRED(5)
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package org.thoughtcrime.securesms.loki
|
||||
|
||||
import android.content.Context
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||
import org.whispersystems.libsignal.state.PreKeyBundle
|
||||
import org.whispersystems.signalservice.loki.messaging.LokiPreKeyBundleStoreProtocol
|
||||
|
||||
class LokiPreKeyBundleStore(val context: Context) : LokiPreKeyBundleStoreProtocol {
|
||||
|
||||
companion object {
|
||||
private val lock = Object()
|
||||
}
|
||||
|
||||
override fun getPreKeyBundle(hexEncodedPublicKey: String): PreKeyBundle? {
|
||||
synchronized(lock) {
|
||||
return DatabaseFactory.getLokiPreKeyBundleDatabase(context).getPreKeyBundle(hexEncodedPublicKey)
|
||||
}
|
||||
}
|
||||
|
||||
override fun removePreKeyBundle(hexEncodedPublicKey: String) {
|
||||
synchronized(lock) {
|
||||
DatabaseFactory.getLokiPreKeyBundleDatabase(context).removePreKeyBundle(hexEncodedPublicKey)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package org.thoughtcrime.securesms.loki
|
||||
|
||||
enum class LokiThreadFriendRequestStatus(val rawValue: Int) {
|
||||
/**
|
||||
* New conversation; no messages sent or received.
|
||||
*/
|
||||
NONE(0),
|
||||
/**
|
||||
* Used to lock the input early while sending.
|
||||
*/
|
||||
REQUEST_SENDING(1),
|
||||
/**
|
||||
* Friend request sent; awaiting response.
|
||||
*/
|
||||
REQUEST_SENT(2),
|
||||
/**
|
||||
* Friend request received; awaiting user input.
|
||||
*/
|
||||
REQUEST_RECEIVED(3),
|
||||
/**
|
||||
* The user is friends with the other user in this thread.
|
||||
*/
|
||||
FRIENDS(4),
|
||||
/**
|
||||
* A friend request was sent, but it timed out (i.e the other user didn't accept within the allocated time).
|
||||
*/
|
||||
REQUEST_EXPIRED(5)
|
||||
}
|
Loading…
Reference in New Issue