Scroll to bottom when new DM received

Closes: #242
Closes: #241
Changelog-Fixed: Scroll to bottom when new DM received
This commit is contained in:
Aidan O'Loan
2023-01-04 09:52:51 -05:00
committed by William Casarin
parent 553dcb785c
commit 96741af97b

View File

@@ -27,6 +27,10 @@ struct DMChatView: View {
}
.onAppear {
scroller.scrollTo("endblock")
}.onChange(of: dms.events.count) { _ in
withAnimation {
scroller.scrollTo("endblock")
}
}
}
}