mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 19:01:38 +03:00
added redux entry for selected feed filters
This commit is contained in:
parent
29e61b4310
commit
16b82a1271
@ -28,6 +28,7 @@ import {
|
||||
SET_PIN_CODE,
|
||||
IS_PIN_CODE_OPEN,
|
||||
IS_RENDER_REQUIRED,
|
||||
SET_FEED_SCREEN_FILTERS,
|
||||
} from '../constants/constants';
|
||||
|
||||
export const login = (payload) => ({
|
||||
@ -183,3 +184,8 @@ export const isRenderRequired = (payload) => ({
|
||||
payload,
|
||||
type: IS_RENDER_REQUIRED,
|
||||
});
|
||||
|
||||
export const setFeedScreenFilters = (payload:string[]) => ({
|
||||
payload,
|
||||
type: SET_FEED_SCREEN_FILTERS
|
||||
})
|
@ -33,6 +33,7 @@ export const CHANGE_MENTION_NOTIFICATION = 'CHANGE_MENTION_NOTIFICATION';
|
||||
export const CHANGE_REBLOG_NOTIFICATION = 'CHANGE_REBLOG_NOTIFICATION';
|
||||
export const CHANGE_TRANSFERS_NOTIFICATION = 'CHANGE_TRANSFERS_NOTIFICATION';
|
||||
export const CHANGE_ALL_NOTIFICATION_SETTINGS = 'CHANGE_ALL_NOTIFICATION_SETTINGS';
|
||||
export const SET_FEED_SCREEN_FILTERS = 'SET_FEED_SCREEN_FILTERS';
|
||||
|
||||
// Accounts
|
||||
export const ADD_OTHER_ACCOUNT = 'ADD_OTHER_ACCOUNT';
|
||||
|
@ -26,6 +26,7 @@ import {
|
||||
SET_PIN_CODE,
|
||||
IS_PIN_CODE_OPEN,
|
||||
IS_RENDER_REQUIRED,
|
||||
SET_FEED_SCREEN_FILTERS,
|
||||
} from '../constants/constants';
|
||||
|
||||
const initialState = {
|
||||
@ -61,6 +62,11 @@ const initialState = {
|
||||
pin: null,
|
||||
isPinCodeOpen: true,
|
||||
isRenderRequired: false,
|
||||
feedScreenfilters:[
|
||||
'friends',
|
||||
'communities',
|
||||
'hot'
|
||||
]
|
||||
};
|
||||
|
||||
export default function (state = initialState, action) {
|
||||
@ -211,6 +217,11 @@ export default function (state = initialState, action) {
|
||||
return Object.assign({}, state, {
|
||||
isRenderRequired: action.payload,
|
||||
});
|
||||
case SET_FEED_SCREEN_FILTERS:
|
||||
return {
|
||||
...state,
|
||||
feedScreenFilters:action.payload
|
||||
}
|
||||
default:
|
||||
return state;
|
||||
}
|
Loading…
Reference in New Issue
Block a user