Skip to content

Commit 8b8e0c9

Browse files
Merge branch 'dev' into fix/qr-scanning-improvements
2 parents 9f041de + 3d637e1 commit 8b8e0c9

File tree

5 files changed

+63
-75
lines changed

5 files changed

+63
-75
lines changed

app/src/main/java/org/thoughtcrime/securesms/home/ConversationView.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ class ConversationView : LinearLayout {
7676
binding.accentView.visibility = if(hasUnreadCount) View.VISIBLE else View.INVISIBLE
7777
}
7878

79-
binding.unreadCountTextView.text = UnreadStylingHelper.formatUnreadCount(unreadCount)
79+
binding.unreadCountTextView.apply{
80+
text = UnreadStylingHelper.formatUnreadCount(unreadCount)
81+
isVisible = hasUnreadCount
82+
}
8083

81-
binding.unreadCountIndicator.isVisible = hasUnreadCount
82-
binding.unreadMentionIndicator.isVisible = thread.unreadMentionCount != 0
84+
binding.unreadMentionBadge.isVisible = thread.unreadMentionCount != 0
8385
binding.markedUnreadIndicator.isVisible = isMarkedUnread
8486

8587
val senderDisplayName = getTitle(thread.recipient)

app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestView.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ class MessageRequestView : LinearLayout {
6464
visibility = if(isUnread) View.VISIBLE else View.INVISIBLE
6565
}
6666

67-
binding.unreadCountTextView.text = UnreadStylingHelper.formatUnreadCount(unreadCount)
68-
binding.unreadCountIndicator.isVisible = isUnread
67+
binding.unreadCountTextView.apply{
68+
text = UnreadStylingHelper.formatUnreadCount(unreadCount)
69+
isVisible = isUnread
70+
}
6971

7072
binding.displayName.apply {
7173
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)

app/src/main/res/layout/view_conversation.xml

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
android:visibility="visible"
104104
app:layout_constrainedWidth="true"
105105
app:layout_constraintBottom_toBottomOf="parent"
106-
app:layout_constraintEnd_toStartOf="@+id/unreadCountIndicator"
106+
app:layout_constraintEnd_toStartOf="@+id/unreadCountTextView"
107107
app:layout_constraintHorizontal_bias="0"
108108
app:layout_constraintHorizontal_chainStyle="packed"
109109
app:layout_constraintStart_toEndOf="@+id/iconPinned"
@@ -131,62 +131,50 @@
131131

132132
</androidx.constraintlayout.widget.ConstraintLayout>
133133

134-
<RelativeLayout
135-
android:id="@+id/unreadCountIndicator"
134+
<TextView
135+
android:id="@+id/unreadCountTextView"
136136
android:layout_width="wrap_content"
137137
android:layout_height="20dp"
138-
android:layout_marginStart="4dp"
138+
android:layout_marginStart="@dimen/very_small_spacing"
139+
android:background="@drawable/rounded_rectangle"
140+
android:backgroundTint="?unreadIndicatorBackgroundColor"
141+
android:gravity="center"
142+
android:includeFontPadding="true"
143+
android:maxWidth="40dp"
144+
android:minWidth="20dp"
145+
android:paddingHorizontal="@dimen/very_small_spacing"
146+
android:textColor="?unreadIndicatorTextColor"
147+
android:textSize="@dimen/very_small_font_size"
148+
android:textStyle="bold"
149+
app:layout_constrainedWidth="true"
150+
app:layout_constraintBottom_toBottomOf="parent"
151+
app:layout_constraintEnd_toStartOf="@id/unreadMentionBadge"
139152
app:layout_constraintStart_toEndOf="@id/markedUnreadIndicator"
140-
app:layout_constraintEnd_toStartOf="@id/unreadMentionIndicator"
141153
app:layout_constraintTop_toTopOf="parent"
142-
app:layout_constraintBottom_toBottomOf="parent"
143-
android:minWidth="20dp"
144-
android:maxWidth="40dp"
145-
android:paddingLeft="4dp"
146-
android:paddingRight="4dp"
147-
android:background="@drawable/rounded_rectangle"
148-
android:backgroundTint="?unreadIndicatorBackgroundColor">
149-
150-
<TextView
151-
android:id="@+id/unreadCountTextView"
152-
android:layout_width="wrap_content"
153-
android:layout_height="wrap_content"
154-
android:layout_centerInParent="true"
155-
android:textColor="?unreadIndicatorTextColor"
156-
android:textSize="@dimen/very_small_font_size"
157-
android:textStyle="bold"
158-
tools:text="8"/>
154+
tools:text="88" />
159155

160-
</RelativeLayout>
161-
162-
<RelativeLayout
163-
android:id="@+id/unreadMentionIndicator"
156+
<TextView
157+
android:id="@+id/unreadMentionBadge"
164158
android:layout_width="wrap_content"
165159
android:layout_height="20dp"
166-
android:layout_marginStart="4dp"
167-
app:layout_constraintStart_toEndOf="@id/unreadCountIndicator"
168-
app:layout_constraintEnd_toStartOf="@id/timestampTextView"
169-
app:layout_constraintTop_toTopOf="parent"
170-
app:layout_constraintBottom_toBottomOf="parent"
171-
android:minWidth="20dp"
172-
android:maxWidth="40dp"
173-
android:paddingLeft="4dp"
174-
android:paddingRight="4dp"
160+
android:layout_marginStart="@dimen/very_small_spacing"
175161
android:background="@drawable/rounded_rectangle"
176-
android:backgroundTint="?unreadIndicatorBackgroundColor">
177-
178-
<TextView
179-
android:id="@+id/unreadMentionTextView"
180-
android:layout_width="wrap_content"
181-
android:layout_height="wrap_content"
182-
android:layout_centerInParent="true"
183-
android:paddingBottom="3dp"
184-
android:textColor="?unreadIndicatorTextColor"
185-
android:textSize="@dimen/very_small_font_size"
186-
android:textStyle="bold"
187-
android:text="@" />
188-
189-
</RelativeLayout>
162+
android:backgroundTint="?unreadIndicatorBackgroundColor"
163+
android:gravity="center"
164+
android:includeFontPadding="true"
165+
android:maxWidth="40dp"
166+
android:minWidth="20dp"
167+
android:paddingHorizontal="@dimen/very_small_spacing"
168+
android:paddingBottom="@dimen/very_small_spacing"
169+
android:text="@"
170+
android:textColor="?unreadIndicatorTextColor"
171+
android:textSize="@dimen/very_small_font_size"
172+
android:textStyle="bold"
173+
app:layout_constrainedWidth="true"
174+
app:layout_constraintBottom_toBottomOf="parent"
175+
app:layout_constraintEnd_toStartOf="@id/timestampTextView"
176+
app:layout_constraintStart_toEndOf="@id/unreadCountTextView"
177+
app:layout_constraintTop_toTopOf="parent" />
190178

191179
<TextView
192180
android:id="@+id/timestampTextView"

app/src/main/res/layout/view_message_request.xml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,35 @@
4444
android:layout_width="wrap_content"
4545
android:layout_height="wrap_content"
4646
app:layout_constraintBottom_toBottomOf="parent"
47-
app:layout_constraintEnd_toStartOf="@id/unreadCountIndicator"
47+
app:layout_constraintEnd_toStartOf="@id/unreadCountTextView"
4848
app:layout_constraintHorizontal_bias="0"
4949
app:layout_constraintHorizontal_chainStyle="packed"
5050
app:layout_constraintStart_toStartOf="parent"
5151
app:layout_constraintTop_toTopOf="parent" />
5252

53-
<RelativeLayout
54-
android:id="@+id/unreadCountIndicator"
53+
<TextView
54+
android:id="@+id/unreadCountTextView"
5555
android:layout_width="wrap_content"
5656
android:layout_height="20dp"
57-
android:layout_marginStart="4dp"
57+
android:layout_marginStart="@dimen/very_small_spacing"
5858
android:background="@drawable/rounded_rectangle"
5959
android:backgroundTint="?unreadIndicatorBackgroundColor"
60+
android:gravity="center"
61+
android:includeFontPadding="true"
6062
android:maxWidth="40dp"
6163
android:minWidth="20dp"
62-
android:paddingLeft="4dp"
63-
android:paddingRight="4dp"
64+
android:paddingStart="@dimen/very_small_spacing"
65+
android:paddingEnd="@dimen/very_small_spacing"
66+
android:textColor="?unreadIndicatorTextColor"
67+
android:textSize="@dimen/very_small_font_size"
68+
android:textStyle="bold"
69+
app:layout_constrainedWidth="true"
6470
app:layout_constraintBottom_toBottomOf="parent"
6571
app:layout_constraintEnd_toStartOf="@id/timestampTextView"
6672
app:layout_constraintStart_toEndOf="@id/displayName"
67-
app:layout_constraintTop_toTopOf="parent">
68-
69-
<TextView
70-
android:id="@+id/unreadCountTextView"
71-
android:layout_width="wrap_content"
72-
android:layout_height="wrap_content"
73-
android:layout_centerInParent="true"
74-
android:textColor="?unreadIndicatorTextColor"
75-
android:textSize="@dimen/very_small_font_size"
76-
android:textStyle="bold"
77-
tools:text="8" />
73+
app:layout_constraintTop_toTopOf="parent"
74+
tools:text="88" />
7875

79-
</RelativeLayout>
8076

8177
<TextView
8278
android:id="@+id/timestampTextView"

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ eventbusVersion = "3.0.0"
2222
exifinterfaceVersion = "1.4.1"
2323
firebaseMessagingVersion = "25.0.0"
2424
flexboxVersion = "3.0.0"
25-
fragmentKtxVersion = "1.8.8"
25+
fragmentKtxVersion = "1.8.9"
2626
gradlePluginVersion = "8.12.0"
2727
dependenciesAnalysisVersion = "2.17.0"
2828
googleServicesVersion = "4.4.2"
29-
junit = "1.2.1"
29+
junit = "1.3.0"
3030
kotlinVersion = "2.2.0"
3131
kotlinxDatetimeVersion = "0.6.0"
3232
kryoVersion = "5.1.1"
@@ -65,7 +65,7 @@ sqlcipherAndroidVersion = "4.9.0"
6565
streamVersion = "1.1.8"
6666
sqliteKtxVersion = "2.5.2"
6767
subsamplingScaleImageViewVersion = "3.10.0"
68-
testCoreVersion = "1.5.0"
68+
testCoreVersion = "1.7.0"
6969
tooltipsVersion = "1.0.6"
7070
truthVersion = "1.1.3"
7171
turbineVersion = "1.1.0"

0 commit comments

Comments
 (0)