Ignore hashtags when sorting channels
This commit is contained in:
parent
fc937aaac8
commit
4694e66e98
4 changed files with 96 additions and 72 deletions
|
@ -2,7 +2,7 @@ import { createSelector } from 'reselect';
|
|||
import get from 'lodash/get';
|
||||
import sortBy from 'lodash/sortBy';
|
||||
import createReducer from 'utils/createReducer';
|
||||
import { find, findIndex } from 'utils';
|
||||
import { trimPrefixChar, find, findIndex } from 'utils';
|
||||
import { getSelectedTab, updateSelection } from './tab';
|
||||
import * as actions from './actions';
|
||||
|
||||
|
@ -100,7 +100,9 @@ export const getSortedChannels = createSelector(getChannels, channels =>
|
|||
sortBy(
|
||||
Object.keys(channels).map(network => ({
|
||||
address: network,
|
||||
channels: sortBy(channels[network], channel => channel.name.toLowerCase())
|
||||
channels: sortBy(channels[network], channel =>
|
||||
trimPrefixChar(channel.name, '#').toLowerCase()
|
||||
)
|
||||
})),
|
||||
network => network.address.toLowerCase()
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue