Fix bug with not updating

This commit is contained in:
krawieck 2020-09-03 00:17:42 +02:00
parent dec88a1d88
commit 8e23e418ba
1 changed files with 4 additions and 2 deletions

View File

@ -29,9 +29,11 @@ class CommentSection extends HookWidget {
var comms = useState(comments);
void sortComments(CommentSortType sort) {
if (sort == sorting.value || sort == CommentSortType.chat) return;
if (sort != sorting.value && sort != CommentSortType.chat) {
CommentTree.sortList(sort, comms.value);
}
CommentTree.sortList(sort, comms.value);
sorting.value = sort;
}
return Column(children: [