Problem: unread channels are at random positions
Solution: move unread channels to the top
This commit is contained in:
parent
7a4f0ce8e1
commit
edf5a029ee
|
@ -156,6 +156,9 @@ GROUP BY c.id;
|
||||||
}})
|
}})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
util.StablePartition(channels, 0, len(channels), func(i int) bool {
|
||||||
|
return channels[i].Unread.HasUnread()
|
||||||
|
})
|
||||||
return channels, nil
|
return channels, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user