Convert withModal to useModal
This commit is contained in:
parent
9cf42df1ea
commit
530e08b9ee
32 changed files with 791 additions and 737 deletions
|
@ -1,5 +1,6 @@
|
|||
import { socket as socketActions } from 'state/actions';
|
||||
import { getWrapWidth, appSet } from 'state/app';
|
||||
import { getConnected, getWrapWidth, appSet } from 'state/app';
|
||||
import { searchChannels } from 'state/channelSearch';
|
||||
import { addMessages } from 'state/messages';
|
||||
import { setSettings } from 'state/settings';
|
||||
import { when } from 'utils/observe';
|
||||
|
@ -12,6 +13,13 @@ function loadState({ store }, env) {
|
|||
type: socketActions.SERVERS,
|
||||
data: env.servers
|
||||
});
|
||||
|
||||
when(store, getConnected, () =>
|
||||
// Cache top channels for each server
|
||||
env.servers.forEach(({ host }) =>
|
||||
store.dispatch(searchChannels(host, ''))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (env.channels) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue