fix: don't open new tab to download attachment (#614)

This commit is contained in:
Jan
2022-05-08 22:53:07 +02:00
committed by GitHub
parent 8497644648
commit c5f8732485
2 changed files with 7 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ import {
Trash,
} from "@styled-icons/boxicons-regular";
import { Cog, UserVoice } from "@styled-icons/boxicons-solid";
import { isFirefox } from "react-device-detect";
import { useHistory } from "react-router-dom";
import { Channel, Message, Server, User, API } from "revolt.js";
import { Permission, UserPermission } from "revolt.js";
@@ -286,7 +287,7 @@ export default function ContextMenus() {
"attachments",
"attachments/download",
),
"_blank",
isFirefox ? "_blank" : "_self",
);
}
break;