FIX: Emoji toolbar too wide on mobile.

This commit is contained in:
Guo Xiang Tan 2015-10-20 09:19:45 +08:00
parent 50d2ba5f8e
commit 97d11b6656
1 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,9 @@ import KeyValueStore from "discourse/lib/key-value-store";
const keyValueStore = new KeyValueStore("discourse_emojis_");
const EMOJI_USAGE = "emojiUsage";
const PER_ROW = 12, PER_PAGE = 60;
let PER_ROW = 12;
const PER_PAGE = 60;
let ungroupedIcons, recentlyUsedIcons;
if (!keyValueStore.getObject(EMOJI_USAGE)) {
@ -159,6 +161,7 @@ function showSelector(options) {
options.appendTo.append('<div class="emoji-modal-wrapper"></div>');
$('.emoji-modal-wrapper').click(() => closeSelector());
if (Discourse.Mobile.mobileView) PER_ROW = 9;
const page = keyValueStore.getInt("emojiPage", 0);
const offset = keyValueStore.getInt("emojiOffset", 0);