From d8bd57901e33a7057e26e782e295099ffcc0da89 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Wed, 6 Sep 2017 23:04:13 -0700
Subject: Removing webapp

---
 webapp/actions/emoji_actions.jsx | 72 ----------------------------------------
 1 file changed, 72 deletions(-)
 delete mode 100644 webapp/actions/emoji_actions.jsx

(limited to 'webapp/actions/emoji_actions.jsx')

diff --git a/webapp/actions/emoji_actions.jsx b/webapp/actions/emoji_actions.jsx
deleted file mode 100644
index 1c0d8b5ea..000000000
--- a/webapp/actions/emoji_actions.jsx
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-import UserStore from 'stores/user_store.jsx';
-
-import AppDispatcher from 'dispatcher/app_dispatcher.jsx';
-import {ActionTypes} from 'utils/constants.jsx';
-
-import store from 'stores/redux_store.jsx';
-const dispatch = store.dispatch;
-const getState = store.getState;
-import {getProfilesByIds} from 'mattermost-redux/actions/users';
-import * as EmojiActions from 'mattermost-redux/actions/emojis';
-
-export async function loadEmoji(getProfiles = true) {
-    const data = await EmojiActions.getAllCustomEmojis()(dispatch, getState);
-
-    if (data && getProfiles) {
-        loadProfilesForEmoji(data);
-    }
-}
-
-function loadProfilesForEmoji(emojiList) {
-    const profilesToLoad = {};
-    for (let i = 0; i < emojiList.length; i++) {
-        const emoji = emojiList[i];
-        if (!UserStore.hasProfile(emoji.creator_id)) {
-            profilesToLoad[emoji.creator_id] = true;
-        }
-    }
-
-    const list = Object.keys(profilesToLoad);
-    if (list.length === 0) {
-        return;
-    }
-
-    getProfilesByIds(list)(dispatch, getState);
-}
-
-export function addEmoji(emoji, image, success, error) {
-    EmojiActions.createCustomEmoji(emoji, image)(dispatch, getState).then(
-        (data) => {
-            if (data && success) {
-                success(data);
-            } else if (data == null && error) {
-                const serverError = getState().requests.emojis.createCustomEmoji.error;
-                error({id: serverError.server_error_id, ...serverError});
-            }
-        }
-    );
-}
-
-export function deleteEmoji(emojiId, success, error) {
-    EmojiActions.deleteCustomEmoji(emojiId)(dispatch, getState).then(
-        (data) => {
-            if (data) {
-                // Needed to remove recently used emoji
-                AppDispatcher.handleServerAction({
-                    type: ActionTypes.REMOVED_CUSTOM_EMOJI,
-                    id: emojiId
-                });
-
-                if (success) {
-                    success(data);
-                }
-            } else if (data == null && error) {
-                const serverError = getState().requests.emojis.deleteCustomEmoji.error;
-                error({id: serverError.server_error_id, ...serverError});
-            }
-        }
-    );
-}
-- 
cgit v1.2.3-1-g7c22

