add a `onMessageSending` function to ThreadListUI and call it here instead