修复消除未读消息数量问题
This commit is contained in:
parent
dd2de79a3f
commit
339aab3baa
|
@ -8,7 +8,9 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { faAngleLeft } from "@fortawesome/free-solid-svg-icons";
|
import { faAngleLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
import InfiniteScrollContent from "@/components/InfiniteScrollContent";
|
import InfiniteScrollContent from "@/components/InfiniteScrollContent";
|
||||||
import OwnIcon from "@/components/OwnIcon";
|
import OwnIcon from "@/components/OwnIcon";
|
||||||
export default function SystemNotice({ mid, total, ...props }) {
|
import { changeNoticeCount } from "@/store/actions";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
function SystemNotice({ mid, changeNoticeCount, total, ...props }) {
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const [hasMore, setHasMore] = useState(1);
|
const [hasMore, setHasMore] = useState(1);
|
||||||
const [offset, setOffset] = useState(0);
|
const [offset, setOffset] = useState(0);
|
||||||
|
@ -39,6 +41,7 @@ export default function SystemNotice({ mid, total, ...props }) {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
changeNoticeCount();
|
||||||
received.current = true;
|
received.current = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,3 +145,9 @@ export default function SystemNotice({ mid, total, ...props }) {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mapDispatchToProps = {
|
||||||
|
changeNoticeCount,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(null, mapDispatchToProps)(SystemNotice);
|
||||||
|
|
Loading…
Reference in New Issue