Keep TabList sorted
This commit is contained in:
parent
7160db9614
commit
6624a97ce7
4 changed files with 46 additions and 23 deletions
|
@ -78,6 +78,17 @@ function compareUsers(a, b) {
|
|||
|
||||
export const getChannels = state => state.channels;
|
||||
|
||||
const key = (v, k) => k.toLowerCase();
|
||||
|
||||
export const getSortedChannels = createSelector(
|
||||
getChannels,
|
||||
channels => channels.withMutations(c =>
|
||||
c.forEach((server, address) =>
|
||||
c.update(address, chans => chans.sortBy(key))
|
||||
)
|
||||
).sortBy(key)
|
||||
);
|
||||
|
||||
export const getSelectedChannel = createSelector(
|
||||
getSelectedTab,
|
||||
getChannels,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue