mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(anon mode): use a different address also per each thread created by the user
This commit is contained in:
@@ -461,6 +461,10 @@ const Board = () => {
|
|||||||
const handleSubmit = async (event) => {
|
const handleSubmit = async (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
if (anonymousMode) {
|
||||||
|
setSelectedThreadCid(index);
|
||||||
|
}
|
||||||
|
|
||||||
setPublishCommentOptions((prevPublishCommentOptions) => ({
|
setPublishCommentOptions((prevPublishCommentOptions) => ({
|
||||||
...prevPublishCommentOptions,
|
...prevPublishCommentOptions,
|
||||||
author: {
|
author: {
|
||||||
|
|||||||
@@ -1163,6 +1163,10 @@ const Catalog = () => {
|
|||||||
const selectedThreadCidRef = useRef(null);
|
const selectedThreadCidRef = useRef(null);
|
||||||
const virtuosoRef = useRef();
|
const virtuosoRef = useRef();
|
||||||
|
|
||||||
|
const setSelectedThreadCid = (cid) => {
|
||||||
|
selectedThreadCidRef.current = cid;
|
||||||
|
};
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const [, setNewErrorMessage] = useError();
|
const [, setNewErrorMessage] = useError();
|
||||||
@@ -1333,6 +1337,10 @@ const Catalog = () => {
|
|||||||
const handleSubmit = async (event) => {
|
const handleSubmit = async (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
if (anonymousMode) {
|
||||||
|
setSelectedThreadCid(index);
|
||||||
|
}
|
||||||
|
|
||||||
setPublishCommentOptions((prevPublishCommentOptions) => ({
|
setPublishCommentOptions((prevPublishCommentOptions) => ({
|
||||||
...prevPublishCommentOptions,
|
...prevPublishCommentOptions,
|
||||||
author: {
|
author: {
|
||||||
|
|||||||
Reference in New Issue
Block a user