Problem: unread channels are at random positions
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

Solution: move unread channels to the top
This commit is contained in:
Peter Stuifzand 2022-04-30 14:10:29 +02:00
parent 7a4f0ce8e1
commit edf5a029ee
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

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