From 33edacf0878fe8569102c6852d0b0349dbd89ac3 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Wed, 8 Jul 2020 13:19:41 -0300 Subject: [PATCH] [FIX] Emoji keyboard not showing custom and frequently used emojis on Share Extension (#2251) --- app/containers/MessageBox/EmojiKeyboard.js | 2 +- app/lib/database/index.js | 4 +++- app/lib/rocketchat.js | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/containers/MessageBox/EmojiKeyboard.js b/app/containers/MessageBox/EmojiKeyboard.js index f8bc13019..8d552509c 100644 --- a/app/containers/MessageBox/EmojiKeyboard.js +++ b/app/containers/MessageBox/EmojiKeyboard.js @@ -17,7 +17,7 @@ export default class EmojiKeyboard extends React.PureComponent { constructor(props) { super(props); const state = store.getState(); - this.baseUrl = state.server.server; + this.baseUrl = state.share.server || state.server.server; } onEmojiSelected = (emoji) => { diff --git a/app/lib/database/index.js b/app/lib/database/index.js index 31bf5317b..37a17a3cd 100644 --- a/app/lib/database/index.js +++ b/app/lib/database/index.js @@ -110,7 +110,9 @@ class DB { Thread, ThreadMessage, Upload, - Permission + Permission, + CustomEmoji, + FrequentlyUsedEmoji ], actionsEnabled: true }); diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 06ff12eda..1848edfb6 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -288,6 +288,8 @@ const RocketChat = { const serversDB = database.servers; reduxStore.dispatch(shareSelectServer(server)); + RocketChat.setCustomEmojis(); + // set User info try { const userId = await RNUserDefaults.get(`${ RocketChat.TOKEN_KEY }-${ server }`);