Use a Deque for roomEvents's ListModel

- Take a custom container callable for ListModel __init__ (defaults to
  list, must be a MutableSequence)

- Use a Deque for roomEvents, which is much faster for inserting
  new items at the beginning.
This commit is contained in:
miruka
2019-04-17 17:07:20 -04:00
parent f0dab1801a
commit 9e5e2c6718
4 changed files with 31 additions and 28 deletions

View File

@@ -7,7 +7,6 @@ Column {
id: "rootCol"
function mins_between(date1, date2) {
console.log(Math.round((((date2 - date1) % 86400000) % 3600000) / 60000))
return Math.round((((date2 - date1) % 86400000) % 3600000) / 60000)
}
@@ -59,8 +58,6 @@ Column {
combine ? standardSpacing / 4 :
standardSpacing
//Text { text: rootCol.topPadding }
Daybreak { visible: dayBreak }
MessageContent { visible: isMessage }