Skip to content

Commit

Permalink
Merge pull request #5189 from vector-im/arb/issues/4640
Browse files Browse the repository at this point in the history
#4640 : The notification badge jumps around
  • Loading branch information
ouchadam authored Feb 11, 2022
2 parents f1376ea + 85414fa commit ea13f1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.d/4640.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Right align the notifications badge in the rooms list (and DMs) so that it's always in a consistent place on the screen.
6 changes: 3 additions & 3 deletions library/ui-styles/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@

<!-- Other colors, which are not in the palette -->
<attr name="vctr_unread_room_badge" format="color" />
<color name="vctr_unread_room_badge_light">#FF61708B</color>
<color name="vctr_unread_room_badge_dark">#FF61708B</color>
<color name="vctr_unread_room_badge_black">#FF61708B</color>
<color name="vctr_unread_room_badge_light">@color/palette_gray_200</color>
<color name="vctr_unread_room_badge_dark">@color/palette_gray_250</color>
<color name="vctr_unread_room_badge_black">@color/palette_gray_250</color>

<attr name="vctr_fab_label_bg" format="color" />
<color name="vctr_fab_label_bg_light">@android:color/white</color>
Expand Down
5 changes: 2 additions & 3 deletions vector/src/main/res/layout/item_room.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/roomNameView"
app:layout_constraintEnd_toStartOf="@id/roomLastEventTimeView"
app:layout_constraintStart_toEndOf="@id/roomDraftBadge"
app:layout_constraintTop_toTopOf="@id/roomNameView"
tools:background="@drawable/bg_unread_highlight"
tools:text="4"
Expand All @@ -190,9 +189,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginEnd="8dp"
android:textAlignment="viewStart"
android:ellipsize="end"
android:maxLines="2"
android:textAlignment="viewStart"
android:textColor="?vctr_content_secondary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/roomNameView"
Expand All @@ -203,12 +202,12 @@
android:id="@+id/roomTypingView"
style="@style/Widget.Vector.TextView.Body"
android:layout_width="0dp"
android:textAlignment="viewStart"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="2"
android:textAlignment="viewStart"
android:textColor="?colorPrimary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
Expand Down

0 comments on commit ea13f1c

Please sign in to comment.