mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
refactor: naming consistent with library
This commit is contained in:
parent
2855d88e55
commit
0729bdab20
@ -1 +1 @@
|
||||
Subproject commit 3060122d0f1d1a6bc7bd22f7799280ce298568e2
|
||||
Subproject commit 65cc4d6b0afaa6d12a9887c8814b16da5dc45863
|
@ -56,7 +56,7 @@ class InstrumentedTests {
|
||||
assertNull(contacts.get(definitelyRealId))
|
||||
|
||||
// Should be an uninitialized contact apart from ID
|
||||
val c = contacts.getOrCreate(definitelyRealId)
|
||||
val c = contacts.getOrConstruct(definitelyRealId)
|
||||
assertEquals(definitelyRealId, c.id)
|
||||
assertNull(c.name)
|
||||
assertNull(c.nickname)
|
||||
@ -97,7 +97,7 @@ class InstrumentedTests {
|
||||
assertFalse(contacts2.needsDump())
|
||||
|
||||
val anotherId = "051111111111111111111111111111111111111111111111111111111111111111"
|
||||
val c2 = contacts2.getOrCreate(anotherId)
|
||||
val c2 = contacts2.getOrConstruct(anotherId)
|
||||
contacts2.set(c2)
|
||||
val push2 = contacts2.push()
|
||||
assertEquals(2, push2.seqNo)
|
||||
|
@ -16,8 +16,8 @@ Java_network_loki_messenger_libsession_1util_Contacts_get(JNIEnv *env, jobject t
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_Contacts_getOrCreate(JNIEnv *env, jobject thiz,
|
||||
jstring session_id) {
|
||||
Java_network_loki_messenger_libsession_1util_Contacts_getOrConstruct(JNIEnv *env, jobject thiz,
|
||||
jstring session_id) {
|
||||
auto contacts = ptrToContacts(env, thiz);
|
||||
auto session_id_chars = env->GetStringUTFChars(session_id, nullptr);
|
||||
auto contact = contacts->get_or_construct(session_id_chars);
|
||||
|
@ -43,7 +43,7 @@ class Contacts(pointer: Long) : ConfigBase(pointer) {
|
||||
}
|
||||
|
||||
external fun get(sessionId: String): Contact?
|
||||
external fun getOrCreate(sessionId: String): Contact
|
||||
external fun getOrConstruct(sessionId: String): Contact
|
||||
external fun all(): List<Contact>
|
||||
external fun set(contact: Contact)
|
||||
external fun erase(sessionId: String): Boolean
|
||||
|
Loading…
Reference in New Issue
Block a user