mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
message status icons approximately work - still a problem on first send though
This commit is contained in:
parent
7506d712ff
commit
0b66d813ef
4 changed files with 83 additions and 48 deletions
|
|
@ -151,12 +151,13 @@ class MessagesFragment : ScreenFragment("Messages"), Logging {
|
|||
private var messages = arrayOf<DataPacket>()
|
||||
|
||||
/// Called when our node DB changes
|
||||
fun onMessagesChanged(nodesIn: Collection<DataPacket>) {
|
||||
messages = nodesIn.toTypedArray()
|
||||
fun onMessagesChanged(msgIn: Collection<DataPacket>) {
|
||||
messages = msgIn.toTypedArray()
|
||||
notifyDataSetChanged() // FIXME, this is super expensive and redraws all messages
|
||||
|
||||
// scroll to the last line
|
||||
messageListView.scrollToPosition(this.itemCount - 1)
|
||||
if (itemCount != 0)
|
||||
messageListView.scrollToPosition(itemCount - 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue