Merge pull request #3862 from tgxworld/emoji_toolbar_mobile
FIX: Emoji toolbar too wide on mobile.
This commit is contained in:
commit
2fe70f6969
|
@ -4,7 +4,9 @@ import KeyValueStore from "discourse/lib/key-value-store";
|
||||||
const keyValueStore = new KeyValueStore("discourse_emojis_");
|
const keyValueStore = new KeyValueStore("discourse_emojis_");
|
||||||
const EMOJI_USAGE = "emojiUsage";
|
const EMOJI_USAGE = "emojiUsage";
|
||||||
|
|
||||||
const PER_ROW = 12, PER_PAGE = 60;
|
let PER_ROW = 12;
|
||||||
|
const PER_PAGE = 60;
|
||||||
|
|
||||||
let ungroupedIcons, recentlyUsedIcons;
|
let ungroupedIcons, recentlyUsedIcons;
|
||||||
|
|
||||||
if (!keyValueStore.getObject(EMOJI_USAGE)) {
|
if (!keyValueStore.getObject(EMOJI_USAGE)) {
|
||||||
|
@ -159,6 +161,7 @@ function showSelector(options) {
|
||||||
options.appendTo.append('<div class="emoji-modal-wrapper"></div>');
|
options.appendTo.append('<div class="emoji-modal-wrapper"></div>');
|
||||||
$('.emoji-modal-wrapper').click(() => closeSelector());
|
$('.emoji-modal-wrapper').click(() => closeSelector());
|
||||||
|
|
||||||
|
if (Discourse.Mobile.mobileView) PER_ROW = 9;
|
||||||
const page = keyValueStore.getInt("emojiPage", 0);
|
const page = keyValueStore.getInt("emojiPage", 0);
|
||||||
const offset = keyValueStore.getInt("emojiOffset", 0);
|
const offset = keyValueStore.getInt("emojiOffset", 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue