From 6a1755d2e32c3f3bcaa67c33f32cb5eb5ab76ea2 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Fri, 16 Oct 2015 09:10:54 -0700
Subject: Inital support for multi-tab loging

---
 web/react/stores/post_store.jsx | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

(limited to 'web/react/stores/post_store.jsx')

diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx
index d8da48000..07e8b461e 100644
--- a/web/react/stores/post_store.jsx
+++ b/web/react/stores/post_store.jsx
@@ -283,10 +283,10 @@ class PostStoreClass extends EventEmitter {
             return 0;
         });
 
-        BrowserStore.setItem('pending_posts_' + channelId, postList);
+        BrowserStore.setGlobalItem('pending_posts_' + channelId, postList);
     }
     getPendingPosts(channelId) {
-        return BrowserStore.getItem('pending_posts_' + channelId);
+        return BrowserStore.getGlobalItem('pending_posts_' + channelId);
     }
     storeUnseenDeletedPost(post) {
         var posts = this.getUnseenDeletedPosts(post.channel_id);
@@ -330,7 +330,7 @@ class PostStoreClass extends EventEmitter {
         this.pStorePendingPosts(channelId, postList);
     }
     clearPendingPosts() {
-        BrowserStore.actionOnItemsWithPrefix('pending_posts_', function clearPending(key) {
+        BrowserStore.actionOnGlobalItemsWithPrefix('pending_posts_', function clearPending(key) {
             BrowserStore.removeItem(key);
         });
     }
@@ -373,26 +373,26 @@ class PostStoreClass extends EventEmitter {
     }
     storeCurrentDraft(draft) {
         var channelId = ChannelStore.getCurrentId();
-        BrowserStore.setItem('draft_' + channelId, draft);
+        BrowserStore.setGlobalItem('draft_' + channelId, draft);
     }
     getCurrentDraft() {
         var channelId = ChannelStore.getCurrentId();
         return this.getDraft(channelId);
     }
     storeDraft(channelId, draft) {
-        BrowserStore.setItem('draft_' + channelId, draft);
+        BrowserStore.setGlobalItem('draft_' + channelId, draft);
     }
     getDraft(channelId) {
-        return BrowserStore.getItem('draft_' + channelId, this.getEmptyDraft());
+        return BrowserStore.getGlobalItem('draft_' + channelId, this.getEmptyDraft());
     }
     storeCommentDraft(parentPostId, draft) {
-        BrowserStore.setItem('comment_draft_' + parentPostId, draft);
+        BrowserStore.setGlobalItem('comment_draft_' + parentPostId, draft);
     }
     getCommentDraft(parentPostId) {
-        return BrowserStore.getItem('comment_draft_' + parentPostId, this.getEmptyDraft());
+        return BrowserStore.getGlobalItem('comment_draft_' + parentPostId, this.getEmptyDraft());
     }
     clearDraftUploads() {
-        BrowserStore.actionOnItemsWithPrefix('draft_', function clearUploads(key, value) {
+        BrowserStore.actionOnGlobalItemsWithPrefix('draft_', function clearUploads(key, value) {
             if (value) {
                 value.uploadsInProgress = [];
                 BrowserStore.setItem(key, value);
@@ -400,7 +400,7 @@ class PostStoreClass extends EventEmitter {
         });
     }
     clearCommentDraftUploads() {
-        BrowserStore.actionOnItemsWithPrefix('comment_draft_', function clearUploads(key, value) {
+        BrowserStore.actionOnGlobalItemsWithPrefix('comment_draft_', function clearUploads(key, value) {
             if (value) {
                 value.uploadsInProgress = [];
                 BrowserStore.setItem(key, value);
-- 
cgit v1.2.3-1-g7c22

