From 169c490892041a7551b167e5f7ab4859ab003bae Mon Sep 17 00:00:00 2001
From: Ryan Wang <R-Wang97@users.noreply.github.com>
Date: Mon, 3 Apr 2017 21:27:14 -0400
Subject: Save recently used emojis after logout (#5926)

---
 webapp/stores/browser_store.jsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'webapp/stores/browser_store.jsx')

diff --git a/webapp/stores/browser_store.jsx b/webapp/stores/browser_store.jsx
index fcd177662..2da6b896f 100644
--- a/webapp/stores/browser_store.jsx
+++ b/webapp/stores/browser_store.jsx
@@ -3,6 +3,7 @@
 
 import {browserHistory} from 'react-router/es6';
 import * as Utils from 'utils/utils.jsx';
+import Constants from 'utils/constants.jsx';
 
 const notSupportedParams = {
     title: Utils.localizeMessage('error.not_supported.title', 'Browser not supported'),
@@ -151,10 +152,15 @@ class BrowserStoreClass {
         const serverVersion = this.getLastServerVersion();
         const landingPageSeen = this.hasSeenLandingPage();
         const selectedTeams = this.getItem('selected_teams');
+        const recentEmojis = localStorage.getItem(Constants.RECENT_EMOJI_KEY);
 
         sessionStorage.clear();
         localStorage.clear();
 
+        if (recentEmojis) {
+            localStorage.setItem(Constants.RECENT_EMOJI_KEY, recentEmojis);
+        }
+
         if (logoutId) {
             sessionStorage.setItem('__logout__', logoutId);
         }
-- 
cgit v1.2.3-1-g7c22

