Skip to content

Commit 0e94816

Browse files
committed
tutorial tweaks
1 parent 356a959 commit 0e94816

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

samplekotlin/src/main/java/com/example/chattutorial/ChannelActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class ChannelActivity : AppCompatActivity() {
4646
messageInputViewModel.bindView(binding.messageInputView, this)
4747

4848
// Step 3 - Let the message input know when we open a thread
49+
// Note: the .observe support was added in kotlin 1.4, upgrade kotlin to support this syntax
4950
messageListViewModel.mode.observe(this) { mode ->
5051
when (mode) {
5152
is Thread -> messageInputViewModel.setActiveThread(mode.parentMessage)

samplekotlin/src/main/res/layout/activity_channel_4.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
android:id="@+id/messageListView"
2828
android:layout_width="0dp"
2929
android:layout_height="0dp"
30+
android:clipToPadding="false"
31+
android:paddingBottom="16dp"
3032
app:layout_constraintBottom_toTopOf="@+id/messageInputView"
3133
app:layout_constraintEnd_toEndOf="parent"
3234
app:layout_constraintStart_toStartOf="parent"
3335
app:layout_constraintTop_toBottomOf="@+id/typingHeaderView"
34-
android:clipToPadding="false"
35-
android:paddingBottom="16dp"
3636
android:background="#f3f5f8"
3737
app:streamMessageTextColorMine="#FFF"
3838
app:streamMessageBackgroundColorMine="#70af74"

0 commit comments

Comments
 (0)