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:
Sorunome 2020-06-25 07:10:07 +00:00
commit 802e3c3f4d

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;
}