mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-01 20:57:45 +00:00
fix nickname in group creating & editing
This commit is contained in:
parent
38ed5c2187
commit
30c7a4c1bb
@ -2,12 +2,8 @@ package org.thoughtcrime.securesms.loki.database
|
||||
|
||||
import android.content.ContentValues
|
||||
import android.content.Context
|
||||
import androidx.core.database.getStringOrNull
|
||||
import net.sqlcipher.Cursor
|
||||
import org.session.libsession.messaging.contacts.Contact
|
||||
import org.session.libsession.messaging.jobs.Job
|
||||
import org.session.libsession.messaging.threads.Address
|
||||
import org.session.libsession.messaging.threads.recipients.Recipient
|
||||
import org.session.libsignal.utilities.Base64
|
||||
import org.thoughtcrime.securesms.database.Database
|
||||
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper
|
||||
|
@ -14,8 +14,8 @@ import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.Toast
|
||||
import kotlinx.android.synthetic.main.fragment_user_details_bottom_sheet.*
|
||||
import network.loki.messenger.R
|
||||
import org.session.libsession.messaging.threads.Address
|
||||
import org.session.libsession.messaging.threads.recipients.Recipient
|
||||
import org.session.libsession.utilities.Address
|
||||
import org.session.libsession.utilities.recipients.Recipient
|
||||
import org.session.libsession.utilities.SSKEnvironment
|
||||
import org.thoughtcrime.securesms.mms.GlideApp
|
||||
|
||||
|
@ -2,16 +2,14 @@ package org.thoughtcrime.securesms.loki.views
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Typeface
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import kotlinx.android.synthetic.main.view_conversation.view.*
|
||||
import network.loki.messenger.R
|
||||
import org.session.libsession.messaging.threads.recipients.Recipient
|
||||
import org.session.libsession.utilities.recipients.Recipient
|
||||
import org.session.libsession.utilities.SSKEnvironment
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||
import org.thoughtcrime.securesms.database.model.ThreadRecord
|
||||
import org.thoughtcrime.securesms.loki.utilities.MentionManagerUtilities.populateUserPublicKeyCacheIfNeeded
|
||||
import org.thoughtcrime.securesms.loki.utilities.MentionUtilities.highlightMentions
|
||||
|
@ -8,6 +8,7 @@ import android.widget.LinearLayout
|
||||
import kotlinx.android.synthetic.main.view_conversation.view.profilePictureView
|
||||
import kotlinx.android.synthetic.main.view_user.view.*
|
||||
import network.loki.messenger.R
|
||||
import org.session.libsession.messaging.contacts.Contact
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||
import org.thoughtcrime.securesms.loki.utilities.MentionManagerUtilities
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests
|
||||
@ -52,6 +53,11 @@ class UserView : LinearLayout {
|
||||
if (publicKey == null || publicKey.isBlank()) {
|
||||
return null
|
||||
} else {
|
||||
val contact = DatabaseFactory.getSessionContactDatabase(context).getContactWithSessionID(publicKey)
|
||||
contact?.let {
|
||||
val contactContext = Contact.contextForRecipient(user)
|
||||
return it.displayName(contactContext)
|
||||
}
|
||||
var result = DatabaseFactory.getLokiUserDatabase(context).getDisplayName(publicKey)
|
||||
val publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(openGroupThreadID)
|
||||
if (result == null && publicChat != null) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.session.libsession.messaging.contacts
|
||||
|
||||
import org.session.libsession.messaging.threads.recipients.Recipient
|
||||
import org.session.libsession.utilities.recipients.Recipient
|
||||
|
||||
class Contact(val sessionID: String) {
|
||||
// The URL from which to fetch the contact's profile picture.
|
||||
|
Loading…
x
Reference in New Issue
Block a user