Merge branch 'dropdown' of ssh://github.com/coralproject/talk into dropdown

This commit is contained in:
Chi Vinh Le
2017-10-13 23:22:59 +07:00
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -23,6 +23,7 @@ function init({store, storage}) {
async function main() {
const notification = createNotificationService(toast);
const context = await createContext({reducers, graphqlExtension, pluginsConfig, notification, init});
render(
<TalkProvider {...context}>
<App />
+3 -2
View File
@@ -7,6 +7,7 @@ import {createRestClient} from './rest';
import thunk from 'redux-thunk';
import {loadTranslations} from './i18n';
import bowser from 'bowser';
import noop from 'lodash/noop';
import {BASE_PATH} from 'coral-framework/constants/url';
import {createPluginsService} from './plugins';
import {createNotificationService} from './notification';
@@ -77,7 +78,7 @@ export async function createContext({
graphqlExtension = {},
notification,
preInit,
init,
init = noop,
} = {}) {
const eventEmitter = new EventEmitter({wildcard: true});
const storage = createStorage();
@@ -179,6 +180,6 @@ export async function createContext({
}
// Run initialization.
await Promise.all([init, plugins.executeInit(context)]);
await Promise.all([init(context), plugins.executeInit(context)]);
return context;
}