[Glitch] Add notification quick-filter bar in the frontend app
Port 13dce12665 to glitch-soc
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { SETTING_CHANGE, SETTING_SAVE } from 'flavours/glitch/actions/settings';
|
||||
import { NOTIFICATIONS_FILTER_SET } from 'flavours/glitch/actions/notifications';
|
||||
import { COLUMN_ADD, COLUMN_REMOVE, COLUMN_MOVE } from 'flavours/glitch/actions/columns';
|
||||
import { STORE_HYDRATE } from 'flavours/glitch/actions/store';
|
||||
import { EMOJI_USE } from 'flavours/glitch/actions/emojis';
|
||||
@@ -34,6 +35,12 @@ const initialState = ImmutableMap({
|
||||
mention: true,
|
||||
}),
|
||||
|
||||
quickFilter: ImmutableMap({
|
||||
active: 'all',
|
||||
show: true,
|
||||
advanced: false,
|
||||
}),
|
||||
|
||||
shows: ImmutableMap({
|
||||
follow: true,
|
||||
favourite: true,
|
||||
@@ -99,6 +106,7 @@ export default function settings(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
case STORE_HYDRATE:
|
||||
return hydrate(state, action.state.get('settings'));
|
||||
case NOTIFICATIONS_FILTER_SET:
|
||||
case SETTING_CHANGE:
|
||||
return state
|
||||
.setIn(action.path, action.value)
|
||||
|
||||
Reference in New Issue
Block a user