mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 20:16:26 +08:00
@@ -1,11 +1,13 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:PiliPlus/common/widgets/dialog/dialog.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart' show ThreeDotItem;
|
||||
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pbenum.dart'
|
||||
show IMSettingType, ThreeDotItemType;
|
||||
import 'package:PiliPlus/pages/common/common_whisper_controller.dart';
|
||||
import 'package:PiliPlus/pages/contact/view.dart';
|
||||
import 'package:PiliPlus/pages/whisper_settings/view.dart';
|
||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||
import 'package:floating/floating.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
@@ -172,6 +174,7 @@ extension ThreeDotItemTypeExt on ThreeDotItemType {
|
||||
void action({
|
||||
required BuildContext context,
|
||||
required CommonWhisperController controller,
|
||||
required ThreeDotItem item,
|
||||
}) {
|
||||
switch (this) {
|
||||
case ThreeDotItemType.THREE_DOT_ITEM_TYPE_READ_ALL:
|
||||
@@ -195,15 +198,26 @@ extension ThreeDotItemTypeExt on ThreeDotItemType {
|
||||
),
|
||||
);
|
||||
case ThreeDotItemType.THREE_DOT_ITEM_TYPE_UP_HELPER:
|
||||
Get.toNamed(
|
||||
'/whisperDetail',
|
||||
arguments: {
|
||||
'talkerId': 844424930131966,
|
||||
'name': 'UP主小助手',
|
||||
'face':
|
||||
'https://message.biliimg.com/bfs/im/489a63efadfb202366c2f88853d2217b5ddc7a13.png',
|
||||
},
|
||||
);
|
||||
dynamic talkerId = PiliScheme.uriDigitRegExp
|
||||
.firstMatch(item.url)
|
||||
?.group(1);
|
||||
if (talkerId != null) {
|
||||
talkerId = int.parse(talkerId);
|
||||
Get.toNamed(
|
||||
'/whisperDetail',
|
||||
arguments: {
|
||||
'talkerId': talkerId,
|
||||
'name': item.title,
|
||||
'face': switch (talkerId) {
|
||||
844424930131966 =>
|
||||
'https://message.biliimg.com/bfs/im/489a63efadfb202366c2f88853d2217b5ddc7a13.png',
|
||||
844424930131964 =>
|
||||
'https://i0.hdslb.com/bfs/im_new/58eda511672db078466e7ab8db22a95c1503684976.png',
|
||||
_ => item.icon,
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
case ThreeDotItemType.THREE_DOT_ITEM_TYPE_CONTACTS:
|
||||
Get.to(const ContactPage(isFromSelect: false));
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user