Showing 1,278 of 4,906 total issues
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { isLoading, links } = this.props;
const banner = (
<DismissableBanner id='explore/links'>
Function ColumnSettings
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ColumnSettings = () => {
const intl = useIntl();
const dispatch = useAppDispatch();
const settings = useAppSelector((state) => state.getIn(['settings', 'firehose']));
const onChange = useCallback(
Function announcementsReducer
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function announcementsReducer(state = initialState, action) {
switch(action.type) {
case ANNOUNCEMENTS_TOGGLE_SHOW:
return state.withMutations(map => {
map.set('show', !map.get('show'));
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { isLoading, links } = this.props;
const banner = (
<DismissableBanner id='explore/links'>
Function announcementsReducer
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function announcementsReducer(state = initialState, action) {
switch(action.type) {
case ANNOUNCEMENTS_TOGGLE_SHOW:
return state.withMutations(map => {
map.set('show', !map.get('show'));
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize
@flavours = {}
Rails.root.glob('app/javascript/flavours/*/theme.yml') do |pathname|
data = YAML.load_file(pathname)
Method remove_statuses
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def remove_statuses
return if options[:skip_status_remove]
start_at = Time.now.to_f
Function EditIndicator
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const EditIndicator = () => {
const intl = useIntl();
const dispatch = useDispatch();
const id = useSelector(state => state.getIn(['compose', 'id']));
const status = useSelector(state => state.getIn(['statuses', id]));
Function SignInBanner
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SignInBanner = () => {
const dispatch = useAppDispatch();
const openClosedRegistrationsModal = useCallback(
() => dispatch(openModal({ modalType: 'CLOSED_REGISTRATIONS' })),
Function EditIndicator
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const EditIndicator = () => {
const intl = useIntl();
const dispatch = useDispatch();
const id = useSelector(state => state.getIn(['compose', 'id']));
const status = useSelector(state => state.getIn(['statuses', id]));
Function SignInBanner
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SignInBanner = () => {
const dispatch = useAppDispatch();
const openClosedRegistrationsModal = useCallback(
() => dispatch(openModal({ modalType: 'CLOSED_REGISTRATIONS' })),
Method configuration
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def configuration
{
urls: {
streaming: Rails.configuration.x.streaming_api_base_url,
status: object.status_page_url,
Function handleKeyDown
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(e: React.KeyboardEvent) => {
switch (e.key) {
case 'Escape':
e.preventDefault();
unfocus();
Function handleKeyDown
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(e: React.KeyboardEvent) => {
switch (e.key) {
case 'Escape':
e.preventDefault();
unfocus();
Function makeGetStatus
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const makeGetStatus = () => {
return createSelector(
[
(state, { id }) => state.getIn(['statuses', id]),
(state, { id }) => state.getIn(['statuses', state.getIn(['statuses', id, 'reblog'])]),
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength, lang, spellCheck } = this.props;
const { suggestionsHidden } = this.state;
return (
Function onReceive
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onReceive(data) {
switch (data.event) {
case 'update':
// @ts-expect-error
dispatch(updateTimeline(timelineId, JSON.parse(data.payload), options.accept));
Function expandTimeline
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function expandTimeline(timelineId, path, params = {}) {
return async (dispatch, getState) => {
const timeline = getState().getIn(['timelines', timelineId], ImmutableMap());
const isLoadingMore = !!params.max_id;
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { disabledAcct, movedToAcct } = this.props;
const disabledAccountLink = (
<Link to={`/@${disabledAcct}`}>
Function componentDidMount
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount () {
const { signedIn } = this.props.identity;
window.addEventListener('beforeunload', this.handleBeforeUnload, false);
window.addEventListener('resize', this.handleResize, { passive: true });