summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2017-01-20 15:45:22 +0100
committerChristopher Speller <crspeller@gmail.com>2017-01-20 09:45:22 -0500
commit6097f93704862215791ce8855c31471e40ef0af1 (patch)
tree54af846802d2f16f9b3d4466b455e5618b81c19d /webapp/utils
parente8d7701b60e8285568ed01c2fe155ed02c388136 (diff)
downloadchat-6097f93704862215791ce8855c31471e40ef0af1.tar.gz
chat-6097f93704862215791ce8855c31471e40ef0af1.tar.bz2
chat-6097f93704862215791ce8855c31471e40ef0af1.zip
Move instances of Client.leaveChannel() in components to an action (#5131)
* Move instances of Client.leaveChannel() in components to an action * create isFavoriteChannelId
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/channel_utils.jsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/utils/channel_utils.jsx b/webapp/utils/channel_utils.jsx
index 14a0e63b3..2189cd789 100644
--- a/webapp/utils/channel_utils.jsx
+++ b/webapp/utils/channel_utils.jsx
@@ -43,6 +43,10 @@ export function isFavoriteChannel(channel) {
return PreferenceStore.getBool(Preferences.CATEGORY_FAVORITE_CHANNEL, channel.id);
}
+export function isFavoriteChannelId(channelId) {
+ return PreferenceStore.getBool(Preferences.CATEGORY_FAVORITE_CHANNEL, channelId);
+}
+
export function isNotDeletedChannel(channel) {
return channel.delete_at === 0;
}