mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-16 01:09:55 +00:00
Merge commit 'c9ea91f8683cd5c0cfac14071a17e3956ac6d3b0' into glitch-soc/merge-upstream
Conflicts: - `spec/requests/api/v1/timelines/tag_spec.rb`: Upstream refactored this file, while we had a change to switch a default setting. Updated as upstream did. - `spec/views/statuses/show.html.haml_spec.rb`: Upstream refactored this file, while we stubbed different methods. Updated as upstream did, and updated the stubs accordingly.
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
import { saveSettings } from './settings';
|
||||
|
||||
export const LANGUAGE_USE = 'LANGUAGE_USE';
|
||||
|
||||
export const useLanguage = language => dispatch => {
|
||||
dispatch({
|
||||
type: LANGUAGE_USE,
|
||||
language,
|
||||
});
|
||||
|
||||
dispatch(saveSettings());
|
||||
};
|
||||
@@ -240,7 +240,6 @@ class LanguageDropdown extends PureComponent {
|
||||
frequentlyUsedLanguages: PropTypes.arrayOf(PropTypes.string),
|
||||
intl: PropTypes.object.isRequired,
|
||||
onChange: PropTypes.func,
|
||||
onClose: PropTypes.func,
|
||||
};
|
||||
|
||||
state = {
|
||||
@@ -257,14 +256,11 @@ class LanguageDropdown extends PureComponent {
|
||||
};
|
||||
|
||||
handleClose = () => {
|
||||
const { value, onClose } = this.props;
|
||||
|
||||
if (this.state.open && this.activeElement) {
|
||||
this.activeElement.focus({ preventScroll: true });
|
||||
}
|
||||
|
||||
this.setState({ open: false });
|
||||
onClose(value);
|
||||
};
|
||||
|
||||
handleChange = value => {
|
||||
|
||||
@@ -4,7 +4,6 @@ import { connect } from 'react-redux';
|
||||
|
||||
|
||||
import { changeComposeLanguage } from 'mastodon/actions/compose';
|
||||
import { useLanguage } from 'mastodon/actions/languages';
|
||||
|
||||
import LanguageDropdown from '../components/language_dropdown';
|
||||
|
||||
@@ -28,11 +27,6 @@ const mapDispatchToProps = dispatch => ({
|
||||
dispatch(changeComposeLanguage(value));
|
||||
},
|
||||
|
||||
onClose (value) {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a react hook
|
||||
dispatch(useLanguage(value));
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(LanguageDropdown);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
|
||||
import { COLUMN_ADD, COLUMN_REMOVE, COLUMN_MOVE, COLUMN_PARAMS_CHANGE } from '../actions/columns';
|
||||
import { COMPOSE_LANGUAGE_CHANGE } from '../actions/compose';
|
||||
import { EMOJI_USE } from '../actions/emojis';
|
||||
import { LANGUAGE_USE } from '../actions/languages';
|
||||
import { LIST_DELETE_SUCCESS, LIST_FETCH_FAIL } from '../actions/lists';
|
||||
import { NOTIFICATIONS_FILTER_SET } from '../actions/notifications';
|
||||
import { SETTING_CHANGE, SETTING_SAVE } from '../actions/settings';
|
||||
@@ -175,7 +175,7 @@ export default function settings(state = initialState, action) {
|
||||
return changeColumnParams(state, action.uuid, action.path, action.value);
|
||||
case EMOJI_USE:
|
||||
return updateFrequentEmojis(state, action.emoji);
|
||||
case LANGUAGE_USE:
|
||||
case COMPOSE_LANGUAGE_CHANGE:
|
||||
return updateFrequentLanguages(state, action.language);
|
||||
case SETTING_SAVE:
|
||||
return state.set('saved', true);
|
||||
|
||||
@@ -7580,7 +7580,7 @@ a.status-card {
|
||||
}
|
||||
}
|
||||
|
||||
.radio-button.checked::before {
|
||||
.radio-button__input.checked::before {
|
||||
position: absolute;
|
||||
left: 2px;
|
||||
top: 2px;
|
||||
|
||||
Reference in New Issue
Block a user