feat: polish message attachment downloads
This commit is contained in:
@@ -6,6 +6,7 @@ import { useI18n } from "../i18n";
|
||||
import { useMemo } from "react";
|
||||
import { formatDateYmd } from "../utils/format";
|
||||
import { officialRecommendationCoverFallbacks } from "./FigmaBanner";
|
||||
import { downloadFile } from "./messageStream/utils/downloadFile";
|
||||
|
||||
function isPlaceholderAsset(path: string | undefined | null) {
|
||||
return !path || path.includes("placeholder-cover");
|
||||
@@ -98,7 +99,7 @@ export function RecommendedCard({
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
window.open(dl, "_blank", "noopener,noreferrer");
|
||||
void downloadFile(dl, r.title).catch(() => {});
|
||||
}}
|
||||
>
|
||||
<Download className="h-5 w-5" strokeWidth={2.2} />
|
||||
|
||||
Reference in New Issue
Block a user