Use timestamp as sort order

This commit is contained in:
Christian Pauly 2020-06-25 09:04:26 +02:00
parent ad67a5abdb
commit 6846b7d5c6

View file

@ -81,7 +81,11 @@ class Room {
double _oldestSortOrder;
double get newSortOrder {
_newestSortOrder++;
var now = DateTime.now().millisecondsSinceEpoch.toDouble();
if (_newestSortOrder >= now) {
now = _newestSortOrder + 1;
}
_newestSortOrder = now;
return _newestSortOrder;
}