Need debugHover for filtered status

This commit is contained in:
Lim Chee Aun 2023-03-23 21:48:29 +08:00
parent 402166e9b2
commit 6685549d11

View file

@ -149,12 +149,21 @@ function Status({
console.debug('RENDER Status', id, status?.account.displayName); console.debug('RENDER Status', id, status?.account.displayName);
const debugHover = (e) => {
if (e.shiftKey) {
console.log(status);
}
};
if (allowFilters && size !== 'l' && _filtered) { if (allowFilters && size !== 'l' && _filtered) {
return ( return (
<FilteredStatus <FilteredStatus
status={status} status={status}
filterInfo={_filtered} filterInfo={_filtered}
instance={instance} instance={instance}
containerProps={{
onMouseEnter: debugHover,
}}
/> />
); );
} }
@ -190,12 +199,6 @@ function Status({
const showSpoiler = !!snapStates.spoilers[id] || false; const showSpoiler = !!snapStates.spoilers[id] || false;
const debugHover = (e) => {
if (e.shiftKey) {
console.log(status);
}
};
if (reblog) { if (reblog) {
// If has statusID, means useItemID (cached in states) // If has statusID, means useItemID (cached in states)
return ( return (
@ -1718,7 +1721,7 @@ function safeBoundingBoxPadding() {
return str; return str;
} }
function FilteredStatus({ status, filterInfo, instance }) { function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
const { const {
account: { avatar, avatarStatic }, account: { avatar, avatarStatic },
createdAt, createdAt,
@ -1742,6 +1745,7 @@ function FilteredStatus({ status, filterInfo, instance }) {
return ( return (
<div <div
{...containerProps}
title={statusPeekText} title={statusPeekText}
onContextMenu={(e) => { onContextMenu={(e) => {
e.preventDefault(); e.preventDefault();