🚸 简化投稿活动点击处理

This commit is contained in:
BTMuli
2026-04-08 00:32:15 +08:00
parent 99d652ac5d
commit f53fcb0a71

View File

@@ -183,7 +183,6 @@ import useBBSStore from "@store/bbs.js";
import useUserStore from "@store/user.js";
import { app, webviewWindow } from "@tauri-apps/api";
import { emit, type Event, listen, type UnlistenFn } from "@tauri-apps/api/event";
import { openUrl } from "@tauri-apps/plugin-opener";
import { parseLink, parsePost } from "@utils/linkParser.js";
import TGClient from "@utils/TGClient.js";
import TGLogger from "@utils/TGLogger.js";
@@ -476,13 +475,12 @@ async function toAct(): Promise<void> {
location.href = `/post_detail/${isPost}`;
return;
}
const res = await parseLink(link);
if (res === true) return;
const res = await parseLink(link, true);
if (res === false) {
showSnackbar.error(`未知链接:${link}`, 3000);
return;
}
await openUrl(res);
await TGClient.open("web_act", link);
}
function handleUser(user: TGApp.BBS.Post.User): void {