Updated chat_conversations, search actions redux
• Updated: - chat_conversations unread_count to return 0 - search to return false if no user
This commit is contained in:
parent
60ce67309c
commit
44b3484cb2
|
@ -395,12 +395,12 @@ export const fetchChatConversationRequestedCount = () => (dispatch, getState) =>
|
||||||
export const fetchChatConversationUnreadCount = () => (dispatch, getState) => {
|
export const fetchChatConversationUnreadCount = () => (dispatch, getState) => {
|
||||||
if (!me) return
|
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({
|
dispatch({
|
||||||
type: CHAT_CONVERSATION_APPROVED_UNREAD_COUNT_FETCH_SUCCESS,
|
type: CHAT_CONVERSATION_APPROVED_UNREAD_COUNT_FETCH_SUCCESS,
|
||||||
count: response.data,
|
count: 0,
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,6 +6,7 @@ import {
|
||||||
importFetchedStatuses,
|
importFetchedStatuses,
|
||||||
} from './importer';
|
} from './importer';
|
||||||
import { importLinkCards } from './links'
|
import { importLinkCards } from './links'
|
||||||
|
import { me } from '../initial_state'
|
||||||
import { SEARCH_FILTERS } from '../constants'
|
import { SEARCH_FILTERS } from '../constants'
|
||||||
|
|
||||||
export const SEARCH_CHANGE = 'SEARCH_CHANGE';
|
export const SEARCH_CHANGE = 'SEARCH_CHANGE';
|
||||||
|
@ -37,6 +38,8 @@ export const clearSearch = () => ({
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export const submitSearch = () => (dispatch, getState) => {
|
export const submitSearch = () => (dispatch, getState) => {
|
||||||
|
if (!me) return
|
||||||
|
|
||||||
const value = getState().getIn(['search', 'value'])
|
const value = getState().getIn(['search', 'value'])
|
||||||
const onlyVerified = getState().getIn(['search', 'filter', 'onlyVerified'])
|
const onlyVerified = getState().getIn(['search', 'filter', 'onlyVerified'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue