Progress
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
COMPOSE_REPLY,
|
||||
COMPOSE_REPLY_CANCEL,
|
||||
COMPOSE_QUOTE,
|
||||
COMPOSE_DIRECT,
|
||||
COMPOSE_MENTION,
|
||||
COMPOSE_SUBMIT_REQUEST,
|
||||
COMPOSE_SUBMIT_SUCCESS,
|
||||
@@ -325,14 +324,6 @@ export default function compose(state = initialState, action) {
|
||||
map.set('caretPosition', null);
|
||||
map.set('idempotencyKey', uuid());
|
||||
});
|
||||
case COMPOSE_DIRECT:
|
||||
return state.withMutations(map => {
|
||||
map.update('text', text => [text.trim(), `@${action.account.get('acct')} `].filter((str) => str.length !== 0).join(' '));
|
||||
map.set('privacy', 'direct');
|
||||
map.set('focusDate', new Date());
|
||||
map.set('caretPosition', null);
|
||||
map.set('idempotencyKey', uuid());
|
||||
});
|
||||
case COMPOSE_SUGGESTIONS_CLEAR:
|
||||
return state.update('suggestions', ImmutableList(), list => list.clear()).set('suggestion_token', null);
|
||||
case COMPOSE_SUGGESTIONS_READY:
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
import {
|
||||
COMPOSE_MENTION,
|
||||
COMPOSE_REPLY,
|
||||
COMPOSE_DIRECT,
|
||||
} from '../actions/compose';
|
||||
import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
|
||||
|
||||
@@ -36,7 +35,6 @@ export default function search(state = initialState, action) {
|
||||
return state.set('hidden', false);
|
||||
case COMPOSE_REPLY:
|
||||
case COMPOSE_MENTION:
|
||||
case COMPOSE_DIRECT:
|
||||
return state.set('hidden', true);
|
||||
case SEARCH_FETCH_SUCCESS:
|
||||
return state.set('results', ImmutableMap({
|
||||
|
||||
@@ -15,18 +15,31 @@ const initialState = ImmutableMap({
|
||||
|
||||
home: ImmutableMap({
|
||||
shows: ImmutableMap({
|
||||
repost: true,
|
||||
photos: true,
|
||||
polls: true,
|
||||
reply: true,
|
||||
}),
|
||||
|
||||
regex: ImmutableMap({
|
||||
body: '',
|
||||
repost: true,
|
||||
videos: true,
|
||||
}),
|
||||
}),
|
||||
|
||||
group: ImmutableMap({
|
||||
lists: ImmutableMap({
|
||||
shows: ImmutableMap({
|
||||
photos: true,
|
||||
polls: true,
|
||||
reply: true,
|
||||
repost: true,
|
||||
videos: true,
|
||||
}),
|
||||
}),
|
||||
|
||||
groups: ImmutableMap({
|
||||
shows: ImmutableMap({
|
||||
photos: true,
|
||||
polls: true,
|
||||
reply: true,
|
||||
repost: true,
|
||||
videos: true,
|
||||
}),
|
||||
}),
|
||||
|
||||
@@ -63,29 +76,10 @@ const initialState = ImmutableMap({
|
||||
}),
|
||||
|
||||
community: ImmutableMap({
|
||||
other: ImmutableMap({
|
||||
allFediverse: false,
|
||||
shows: ImmutableMap({
|
||||
inSidebar: false,
|
||||
onlyMedia: false,
|
||||
}),
|
||||
regex: ImmutableMap({
|
||||
body: '',
|
||||
}),
|
||||
}),
|
||||
|
||||
public: ImmutableMap({
|
||||
regex: ImmutableMap({
|
||||
body: '',
|
||||
}),
|
||||
}),
|
||||
|
||||
direct: ImmutableMap({
|
||||
regex: ImmutableMap({
|
||||
body: '',
|
||||
}),
|
||||
}),
|
||||
|
||||
trends: ImmutableMap({
|
||||
show: true,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user