fix: reply jump url

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-10 11:00:21 +08:00
parent a951d42623
commit 6817eb6e56
6 changed files with 35 additions and 24 deletions

View File

@@ -26,6 +26,7 @@ class SearchPanelController extends CommonController {
String tag;
int? pubBegin;
int? pubEnd;
bool? hasPushDetail;
@override
void onInit() {
@@ -46,7 +47,10 @@ class SearchPanelController extends CommonController {
?.insertAll(0, (loadingState.value as Success).response);
}
loadingState.value = LoadingState.success(response.response.list);
if (currentPage == 1) {
if (hasPushDetail != true &&
currentPage == 1 &&
searchType == SearchType.video) {
hasPushDetail = true;
onPushDetail(response.response.list);
}
} else {

View File

@@ -836,13 +836,11 @@ class ReplyItem extends StatelessWidget {
),
recognizer: TapGestureRecognizer()
..onTap = () async {
final String title = content.jumpUrl[matchStr]['title'];
late final String title = content.url[matchStr]!.title;
if (appUrlSchema == '') {
if (matchStr.startsWith('BV')) {
UrlUtils.matchUrlPush(
matchStr,
'',
);
if (RegExp(r'^(av|bv)', caseSensitive: false)
.hasMatch(matchStr)) {
UrlUtils.matchUrlPush(matchStr, '');
} else if (RegExp(r'^[Cc][Vv][0-9]+$')
.hasMatch(matchStr)) {
Get.toNamed('/htmlRender', parameters: {

View File

@@ -876,13 +876,11 @@ class ReplyItemGrpc extends StatelessWidget {
),
recognizer: TapGestureRecognizer()
..onTap = () async {
final String title = content.url[matchStr]!.title;
late final String title = content.url[matchStr]!.title;
if (appUrlSchema == '') {
if (matchStr.startsWith('BV')) {
UrlUtils.matchUrlPush(
matchStr,
'',
);
if (RegExp(r'^(av|bv)', caseSensitive: false)
.hasMatch(matchStr)) {
UrlUtils.matchUrlPush(matchStr, '');
} else if (RegExp(r'^[Cc][Vv][0-9]+$')
.hasMatch(matchStr)) {
Get.toNamed('/htmlRender', parameters: {