Use timestamp as sort order
This commit is contained in:
parent
ad67a5abdb
commit
6846b7d5c6
|
@ -81,7 +81,11 @@ class Room {
|
||||||
double _oldestSortOrder;
|
double _oldestSortOrder;
|
||||||
|
|
||||||
double get newSortOrder {
|
double get newSortOrder {
|
||||||
_newestSortOrder++;
|
var now = DateTime.now().millisecondsSinceEpoch.toDouble();
|
||||||
|
if (_newestSortOrder >= now) {
|
||||||
|
now = _newestSortOrder + 1;
|
||||||
|
}
|
||||||
|
_newestSortOrder = now;
|
||||||
return _newestSortOrder;
|
return _newestSortOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue