Merge branch 'krille/timestamp-as-sort-order' into 'master'
Use timestamp as sort order Closes #78 See merge request famedly/famedlysdk!362
This commit is contained in:
commit
802e3c3f4d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue