mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-30 14:30:46 +00:00
Fix conversation toolbar extras (#961)
* fix: remove official open group banner, set block banner under toolbar * fix: remove shade visibility in preview
This commit is contained in:
parent
b1918f07e1
commit
361ff8370b
@ -513,14 +513,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addOpenGroupGuidelinesIfNeeded(isOxenHostedOpenGroup: Boolean) {
|
|
||||||
if (!isOxenHostedOpenGroup) { return }
|
|
||||||
binding?.openGroupGuidelinesView?.visibility = View.VISIBLE
|
|
||||||
val recyclerViewLayoutParams = binding?.conversationRecyclerView?.layoutParams as RelativeLayout.LayoutParams? ?: return
|
|
||||||
recyclerViewLayoutParams.topMargin = toPx(57, resources) // The height of the open group guidelines view is hardcoded to this
|
|
||||||
binding?.conversationRecyclerView?.layoutParams = recyclerViewLayoutParams
|
|
||||||
}
|
|
||||||
|
|
||||||
// called from onCreate
|
// called from onCreate
|
||||||
private fun setUpTypingObserver() {
|
private fun setUpTypingObserver() {
|
||||||
ApplicationContext.getInstance(this).typingStatusRepository.getTypists(viewModel.threadId).observe(this) { state ->
|
ApplicationContext.getInstance(this).typingStatusRepository.getTypists(viewModel.threadId).observe(this) { state ->
|
||||||
@ -594,7 +586,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
Toast.makeText(this@ConversationActivityV2, it.message, Toast.LENGTH_LONG).show()
|
Toast.makeText(this@ConversationActivityV2, it.message, Toast.LENGTH_LONG).show()
|
||||||
viewModel.messageShown(it.id)
|
viewModel.messageShown(it.id)
|
||||||
}
|
}
|
||||||
addOpenGroupGuidelinesIfNeeded(uiState.isOxenHostedOpenGroup)
|
|
||||||
if (uiState.isMessageRequestAccepted == true) {
|
if (uiState.isMessageRequestAccepted == true) {
|
||||||
binding?.messageRequestBar?.visibility = View.GONE
|
binding?.messageRequestBar?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
@ -20,18 +20,12 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.components.OpenGroupGuidelinesView
|
|
||||||
android:id="@+id/openGroupGuidelinesView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.ConversationRecyclerView
|
<org.thoughtcrime.securesms.conversation.v2.ConversationRecyclerView
|
||||||
android:id="@+id/conversationRecyclerView"
|
android:id="@+id/conversationRecyclerView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/toolbar"
|
android:layout_above="@+id/typingIndicatorViewContainer"
|
||||||
android:layout_above="@+id/typingIndicatorViewContainer" />
|
android:layout_below="@id/toolbar" />
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.components.TypingIndicatorViewContainer
|
<org.thoughtcrime.securesms.conversation.v2.components.TypingIndicatorViewContainer
|
||||||
android:id="@+id/typingIndicatorViewContainer"
|
android:id="@+id/typingIndicatorViewContainer"
|
||||||
@ -60,8 +54,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/reactions_screen_light_shade_color"
|
android:background="@color/reactions_screen_light_shade_color"
|
||||||
android:foreground="@color/reactions_screen_dark_shade_color"
|
android:foreground="@color/reactions_screen_dark_shade_color"
|
||||||
android:visibility="gone"
|
android:visibility="gone"/>
|
||||||
tools:visibility="visible"/>
|
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/conversation_reaction_scrubber_stub"
|
android:id="@+id/conversation_reaction_scrubber_stub"
|
||||||
@ -180,8 +173,8 @@
|
|||||||
android:id="@+id/blockedBanner"
|
android:id="@+id/blockedBanner"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
android:background="@color/destructive"
|
android:background="@color/destructive"
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
@ -191,8 +184,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_margin="@dimen/medium_spacing"
|
android:layout_margin="@dimen/medium_spacing"
|
||||||
android:textSize="@dimen/small_font_size"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/small_font_size"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="Elon is blocked. Unblock them?" />
|
tools:text="Elon is blocked. Unblock them?" />
|
||||||
|
|
||||||
@ -212,11 +205,11 @@
|
|||||||
android:id="@+id/sendAcceptsTextView"
|
android:id="@+id/sendAcceptsTextView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:layout_margin="@dimen/medium_spacing"
|
android:layout_margin="@dimen/medium_spacing"
|
||||||
|
android:alpha="0.6"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/message_requests_send_notice"
|
android:text="@string/message_requests_send_notice"
|
||||||
android:textColor="@color/text"
|
android:textColor="@color/text"
|
||||||
android:alpha="0.6"
|
|
||||||
android:textSize="@dimen/small_font_size" />
|
android:textSize="@dimen/small_font_size" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user