Commit 44b3484c authored by mgabdev's avatar mgabdev

Updated chat_conversations, search actions redux

• Updated:
- chat_conversations unread_count to return 0
- search to return false if no user
parent 60ce6730
......@@ -395,12 +395,12 @@ export const fetchChatConversationRequestedCount = () => (dispatch, getState) =>
export const fetchChatConversationUnreadCount = () => (dispatch, getState) => {
if (!me) return
api(getState).get('/api/v1/chat_conversations/approved_conversations/unread_count').then(response => {
// api(getState).get('/api/v1/chat_conversations/approved_conversations/unread_count').then(response => {
dispatch({
type: CHAT_CONVERSATION_APPROVED_UNREAD_COUNT_FETCH_SUCCESS,
count: response.data,
count: 0,
})
})
// })
}
/**
......
......@@ -6,6 +6,7 @@ import {
importFetchedStatuses,
} from './importer';
import { importLinkCards } from './links'
import { me } from '../initial_state'
import { SEARCH_FILTERS } from '../constants'
export const SEARCH_CHANGE = 'SEARCH_CHANGE';
......@@ -37,6 +38,8 @@ export const clearSearch = () => ({
*
*/
export const submitSearch = () => (dispatch, getState) => {
if (!me) return
const value = getState().getIn(['search', 'value'])
const onlyVerified = getState().getIn(['search', 'filter', 'onlyVerified'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment