2017-10-28 03:29:48 +08:00
|
|
|
import React from 'react';
|
2017-03-17 03:57:45 +08:00
|
|
|
import { createContainer } from 'meteor/react-meteor-data';
|
|
|
|
import UserListService from '/imports/ui/components/user-list/service';
|
2017-03-29 02:41:48 +08:00
|
|
|
import Settings from '/imports/ui/services/settings';
|
2017-10-28 03:29:48 +08:00
|
|
|
import ChatNotification from './component';
|
2017-03-17 03:57:45 +08:00
|
|
|
|
2017-10-28 03:29:48 +08:00
|
|
|
const ChatNotificationContainer = props => (
|
|
|
|
<ChatNotification {...props} />
|
|
|
|
);
|
2017-03-17 03:57:45 +08:00
|
|
|
|
2017-10-06 20:50:01 +08:00
|
|
|
export default createContainer(() => {
|
2017-03-29 02:41:48 +08:00
|
|
|
const AppSettings = Settings.application;
|
2017-10-28 03:29:48 +08:00
|
|
|
const openChats = UserListService.getOpenChats();
|
2017-03-17 03:57:45 +08:00
|
|
|
|
|
|
|
return {
|
|
|
|
disableAudio: !AppSettings.chatAudioNotifications,
|
2017-10-28 03:29:48 +08:00
|
|
|
disableNotify: !AppSettings.chatPushNotifications,
|
|
|
|
openChats,
|
2017-03-17 03:57:45 +08:00
|
|
|
};
|
|
|
|
}, ChatNotificationContainer);
|