mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 02:55:23 +00:00
Updated logic for hiding the input in conversation
This commit is contained in:
parent
a56e1d0b91
commit
41ab9b98f8
@ -261,8 +261,14 @@ class ConversationViewModel(
|
||||
_recipient.updateTo(repository.maybeGetRecipientForThreadId(threadId))
|
||||
}
|
||||
|
||||
fun hidesInputBar(): Boolean = openGroup?.canWrite != true &&
|
||||
blindedRecipient?.blocksCommunityMessageRequests == true
|
||||
/**
|
||||
* The input should be hidden when:
|
||||
* - We are in a community without write access
|
||||
* - We are dealing with a contact from a community (blinded recipient) that does not allow
|
||||
* requests form community members
|
||||
*/
|
||||
fun hidesInputBar(): Boolean = openGroup?.canWrite == false ||
|
||||
blindedRecipient?.blocksCommunityMessageRequests == true
|
||||
|
||||
fun legacyBannerRecipient(context: Context): Recipient? = recipient?.run {
|
||||
storage.getLastLegacyRecipient(address.serialize())?.let { Recipient.from(context, Address.fromSerialized(it), false) }
|
||||
|
Loading…
Reference in New Issue
Block a user