fix(iOS): actually fix context menus

closes #138
This commit is contained in:
Paul Makles
2022-03-05 14:41:41 +00:00
parent fdaadfb428
commit 72792566da
15 changed files with 90 additions and 61 deletions

View File

@@ -7,7 +7,8 @@ import { User } from "revolt.js/dist/maps/Users";
import styles from "./Friend.module.scss";
import classNames from "classnames";
import { attachContextMenu } from "preact-context-menu";
import { Ref } from "preact";
import { refContextMenu } from "preact-context-menu";
import { Text } from "preact-i18n";
import { useContext } from "preact/hooks";
@@ -132,7 +133,11 @@ export const Friend = observer(({ user }: Props) => {
<div
className={styles.friend}
onClick={() => openScreen({ id: "profile", user_id: user._id })}
onContextMenu={attachContextMenu("Menu", { user: user._id })}>
ref={
refContextMenu("Menu", {
user: user._id,
}) as Ref<HTMLDivElement>
}>
<UserIcon target={user} size={36} status />
<div className={styles.name}>
<span>{user.username}</span>