diff --git a/changelog.d/4642.bugfix b/changelog.d/4642.bugfix
new file mode 100644
index 0000000000..2a5ea97196
--- /dev/null
+++ b/changelog.d/4642.bugfix
@@ -0,0 +1 @@
+Update the top bar in a room: remove topic and typing information
\ No newline at end of file
diff --git a/library/ui-styles/src/main/res/values/style_action_button.xml b/library/ui-styles/src/main/res/values/style_action_button.xml
new file mode 100644
index 0000000000..0a3c73622f
--- /dev/null
+++ b/library/ui-styles/src/main/res/values/style_action_button.xml
@@ -0,0 +1,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/library/ui-styles/src/main/res/values/theme_dark.xml b/library/ui-styles/src/main/res/values/theme_dark.xml
index 100a07f41d..31e64184bc 100644
--- a/library/ui-styles/src/main/res/values/theme_dark.xml
+++ b/library/ui-styles/src/main/res/values/theme_dark.xml
@@ -141,6 +141,9 @@
- @style/Widget.Vector.Keyword
- @color/vctr_toast_background_dark
+
+ - @style/Widget.Vector.ActionButton
+
diff --git a/library/ui-styles/src/main/res/values/theme_light.xml b/library/ui-styles/src/main/res/values/theme_light.xml
index 39e78ee5b1..e53bc510da 100644
--- a/library/ui-styles/src/main/res/values/theme_light.xml
+++ b/library/ui-styles/src/main/res/values/theme_light.xml
@@ -142,6 +142,9 @@
- @style/Widget.Vector.Keyword
- @color/vctr_toast_background_light
+
+ - @style/Widget.Vector.ActionButton
+
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt
index 501b6c9078..662af3d546 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt
@@ -21,7 +21,6 @@ import android.app.Activity
import android.content.Intent
import android.content.res.Configuration
import android.graphics.Color
-import android.graphics.Typeface
import android.net.Uri
import android.os.Build
import android.os.Bundle
@@ -1545,7 +1544,7 @@ class TimelineFragment @Inject constructor(
override fun invalidate() = withState(timelineViewModel, messageComposerViewModel) { mainState, messageComposerState ->
invalidateOptionsMenu()
val summary = mainState.asyncRoomSummary()
- renderToolbar(summary, mainState.formattedTypingUsers)
+ renderToolbar(summary)
renderTypingMessageNotification(summary, mainState)
views.removeJitsiWidgetView.render(mainState)
if (mainState.hasFailedSending) {
@@ -1614,7 +1613,7 @@ class TimelineFragment @Inject constructor(
}
}
- private fun renderToolbar(roomSummary: RoomSummary?, typingMessage: String?) {
+ private fun renderToolbar(roomSummary: RoomSummary?) {
if (!isThreadTimeLine()) {
views.includeRoomToolbar.roomToolbarContentView.isVisible = true
views.includeThreadToolbar.roomToolbarThreadConstraintLayout.isVisible = false
@@ -1624,7 +1623,6 @@ class TimelineFragment @Inject constructor(
views.includeRoomToolbar.roomToolbarContentView.isClickable = roomSummary.membership == Membership.JOIN
views.includeRoomToolbar.roomToolbarTitleView.text = roomSummary.displayName
avatarRenderer.render(roomSummary.toMatrixItem(), views.includeRoomToolbar.roomToolbarAvatarImageView)
- renderSubTitle(typingMessage, roomSummary.topic)
views.includeRoomToolbar.roomToolbarDecorationImageView.render(roomSummary.roomEncryptionTrustLevel)
views.includeRoomToolbar.roomToolbarPresenceImageView.render(roomSummary.isDirect, roomSummary.directUserPresence)
views.includeRoomToolbar.roomToolbarPublicImageView.isVisible = roomSummary.isPublic && !roomSummary.isDirect
@@ -1642,21 +1640,6 @@ class TimelineFragment @Inject constructor(
}
}
- private fun renderSubTitle(typingMessage: String?, topic: String) {
- // TODO Temporary place to put typing data
- val subtitle = typingMessage?.takeIf { it.isNotBlank() } ?: topic
- views.includeRoomToolbar.roomToolbarSubtitleView.apply {
- setTextOrHide(subtitle)
- if (typingMessage.isNullOrBlank()) {
- setTextColor(colorProvider.getColorFromAttribute(R.attr.vctr_content_secondary))
- setTypeface(null, Typeface.NORMAL)
- } else {
- setTextColor(colorProvider.getColorFromAttribute(R.attr.colorPrimary))
- setTypeface(null, Typeface.BOLD)
- }
- }
- }
-
private fun renderSendMessageResult(sendMessageResult: MessageComposerViewEvents.SendMessageResult) {
when (sendMessageResult) {
is MessageComposerViewEvents.SlashCommandLoading -> {
diff --git a/vector/src/main/res/layout/view_room_detail_toolbar.xml b/vector/src/main/res/layout/view_room_detail_toolbar.xml
index 147c5409f8..d8a60b1fd0 100644
--- a/vector/src/main/res/layout/view_room_detail_toolbar.xml
+++ b/vector/src/main/res/layout/view_room_detail_toolbar.xml
@@ -9,8 +9,8 @@
+ android:layout_width="11dp"
+ android:layout_height="13dp"
+ app:layout_constraintCircle="@id/roomToolbarAvatarImageView"
+ app:layout_constraintCircleAngle="120"
+ app:layout_constraintCircleRadius="18dp"
+ tools:ignore="MissingConstraints" />
@@ -57,43 +57,25 @@
app:layout_constraintCircleAngle="135"
app:layout_constraintCircleRadius="20dp"
tools:ignore="MissingConstraints"
- tools:visibility="visible" />
+ tools:visibility="invisible" />
-
-