mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
opt msgNotifyMsg
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -686,6 +686,24 @@ class ChatItem extends StatelessWidget {
|
|||||||
|
|
||||||
Widget msgTypeNotifyMsg_10(ThemeData theme, content) {
|
Widget msgTypeNotifyMsg_10(ThemeData theme, content) {
|
||||||
List? modules = content['modules'] as List?;
|
List? modules = content['modules'] as List?;
|
||||||
|
List<Widget>? jumpItem([String index = '']) {
|
||||||
|
final String? uri = content['jump_uri$index'];
|
||||||
|
if (uri != null && uri.isNotEmpty) {
|
||||||
|
final String? text = content['jump_text$index'];
|
||||||
|
return [
|
||||||
|
Divider(color: theme.colorScheme.primary.withValues(alpha: 0.05)),
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () => PiliScheme.routePushFromUrl(uri),
|
||||||
|
child: Text(
|
||||||
|
text?.isNotEmpty == true ? text! : '查看详情',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return Center(
|
return Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
constraints: const BoxConstraints(maxWidth: 400),
|
constraints: const BoxConstraints(maxWidth: 400),
|
||||||
@@ -725,33 +743,9 @@ class ChatItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
if ((content['jump_text'] as String?)?.isNotEmpty == true &&
|
...?jumpItem(),
|
||||||
(content['jump_uri'] as String?)?.isNotEmpty == true) ...[
|
...?jumpItem('_2'),
|
||||||
Divider(color: theme.colorScheme.primary.withValues(alpha: 0.05)),
|
...?jumpItem('_3'),
|
||||||
GestureDetector(
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () => PiliScheme.routePushFromUrl(content['jump_uri']),
|
|
||||||
child: Text(content['jump_text']),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
if ((content['jump_text_2'] as String?)?.isNotEmpty == true &&
|
|
||||||
(content['jump_uri_2'] as String?)?.isNotEmpty == true) ...[
|
|
||||||
Divider(color: theme.colorScheme.primary.withValues(alpha: 0.05)),
|
|
||||||
GestureDetector(
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () => PiliScheme.routePushFromUrl(content['jump_uri_2']),
|
|
||||||
child: Text(content['jump_text_2']),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
if ((content['jump_text_3'] as String?)?.isNotEmpty == true &&
|
|
||||||
(content['jump_uri_3'] as String?)?.isNotEmpty == true) ...[
|
|
||||||
Divider(color: theme.colorScheme.primary.withValues(alpha: 0.05)),
|
|
||||||
GestureDetector(
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () => PiliScheme.routePushFromUrl(content['jump_uri_3']),
|
|
||||||
child: Text(content['jump_text_3']),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -668,8 +668,9 @@ abstract class PiliScheme {
|
|||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
launchURL();
|
|
||||||
}
|
}
|
||||||
|
launchURL();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final pathSegments = uri.pathSegments;
|
final pathSegments = uri.pathSegments;
|
||||||
|
|||||||
Reference in New Issue
Block a user