Load user stickerpacks

This commit is contained in:
Richard Lewis 2018-01-11 11:12:46 +00:00
parent 1a994b88f5
commit 2cf9da8c95

View File

@ -24,6 +24,7 @@ import dis from '../../../dispatcher';
import Autocomplete from './Autocomplete'; import Autocomplete from './Autocomplete';
import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore";
import Popover from 'react-simple-popover'; import Popover from 'react-simple-popover';
import Widgets from '../../../utils/widgets';
export default class MessageComposer extends React.Component { export default class MessageComposer extends React.Component {
constructor(props, context) { constructor(props, context) {
@ -283,10 +284,11 @@ export default class MessageComposer extends React.Component {
// Stickers // Stickers
if (this.state.showStickers) { if (this.state.showStickers) {
let stickerpackWidget = ''; const stickerpackWidget = Widgets.getStickerpackWidgets()[0];
console.warn('Stickerpack widgets', stickerpackWidget);
let stickersContent = <p>Click here to add your first sitckerpack</p>; let stickersContent = <p>Click here to add your first sitckerpack</p>;
if (true) { if (stickerpackWidget && stickerpackWidget.content && stickerpackWidget.content.url) {
stickersContent = <iframe src={stickerpackWidget} style={{ stickersContent = <iframe src={stickerpackWidget.content.url} style={{
borderRadius: '5px', borderRadius: '5px',
border: 'none', border: 'none',
}}></iframe>; }}></iframe>;