Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: #919 リストの「Hide members in home」設定状況が、アカウントのリスト追加画面に表示されない #924

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/javascript/mastodon/features/list_adder/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { isFulfilled } from '@reduxjs/toolkit';

import CloseIcon from '@/material-icons/400-24px/close.svg?react';
import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react';
import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react';
import { fetchLists } from 'mastodon/actions/lists';
import { createList } from 'mastodon/actions/lists_typed';
import {
Expand Down Expand Up @@ -39,9 +40,10 @@ const messages = defineMessages({
const ListItem: React.FC<{
id: string;
title: string;
exclusive: boolean;
checked: boolean;
onChange: (id: string, checked: boolean) => void;
}> = ({ id, title, checked, onChange }) => {
}> = ({ id, title, exclusive, checked, onChange }) => {
const handleChange = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {
onChange(id, e.target.checked);
Expand All @@ -50,10 +52,10 @@ const ListItem: React.FC<{
);

return (
// eslint-disable-next-line jsx-a11y/label-has-associated-control
<label className='lists__item'>
<div className='lists__item__title'>
<Icon id='list-ul' icon={ListAltIcon} />
{exclusive && <Icon id='eye-slash' icon={VisibilityOffIcon} />}
<span>{title}</span>
</div>

Expand Down Expand Up @@ -199,6 +201,7 @@ const ListAdder: React.FC<{
key={list.id}
id={list.id}
title={list.title}
exclusive={list.exclusive}
checked={listIds.includes(list.id)}
onChange={handleToggle}
/>
Expand Down
Loading