mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +08:00
@@ -28,6 +28,7 @@ class _DynTopicRcmdPageState extends State<DynTopicRcmdPage> {
|
|||||||
child: refreshIndicator(
|
child: refreshIndicator(
|
||||||
onRefresh: _controller.onRefresh,
|
onRefresh: _controller.onRefresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
|
|||||||
@@ -129,9 +129,9 @@ class _LiveDmBlockPageState extends State<LiveDmBlockPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (!isPortrait) title,
|
title,
|
||||||
tabBar,
|
tabBar,
|
||||||
Expanded(child: view)
|
Expanded(child: view),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -97,18 +97,12 @@ class LiveRoomChat extends StatelessWidget {
|
|||||||
TextSpan _buildMsg(dynamic obj) {
|
TextSpan _buildMsg(dynamic obj) {
|
||||||
dynamic emots = obj['emots'];
|
dynamic emots = obj['emots'];
|
||||||
dynamic uemote = obj['uemote'];
|
dynamic uemote = obj['uemote'];
|
||||||
List list = [
|
List<String> list = [
|
||||||
if (emots != null) ...emots.keys,
|
if (emots != null) ...emots.keys,
|
||||||
if (uemote is Map) uemote['emoticon_unique'].replaceFirst('upower_', '')
|
if (uemote is Map) uemote['emoticon_unique'].replaceFirst('upower_', '')
|
||||||
];
|
];
|
||||||
if (list.isNotEmpty) {
|
if (list.isNotEmpty) {
|
||||||
list = list.map((e) {
|
RegExp regExp = RegExp(list.map(RegExp.escape).join('|'));
|
||||||
return e.toString().replaceAllMapped(
|
|
||||||
RegExp(r'\[(.*?)\]'),
|
|
||||||
(match) => r'\[' + match.group(1)! + r'\]',
|
|
||||||
);
|
|
||||||
}).toList();
|
|
||||||
RegExp regExp = RegExp(list.join('|'));
|
|
||||||
final List<InlineSpan> spanChildren = <InlineSpan>[];
|
final List<InlineSpan> spanChildren = <InlineSpan>[];
|
||||||
(obj['text'] as String).splitMapJoin(
|
(obj['text'] as String).splitMapJoin(
|
||||||
regExp,
|
regExp,
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class _MemberAudioState extends State<MemberAudio>
|
|||||||
return refreshIndicator(
|
return refreshIndicator(
|
||||||
onRefresh: _controller.onRefresh,
|
onRefresh: _controller.onRefresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:PiliPlus/common/constants.dart';
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
import 'package:PiliPlus/common/skeleton/video_card_v.dart';
|
import 'package:PiliPlus/common/skeleton/video_card_v.dart';
|
||||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models_new/member/coin_like_arc/item.dart';
|
import 'package:PiliPlus/models_new/member/coin_like_arc/item.dart';
|
||||||
import 'package:PiliPlus/pages/member_coin_arc/controller.dart';
|
import 'package:PiliPlus/pages/member_coin_arc/controller.dart';
|
||||||
@@ -43,7 +44,10 @@ class _MemberCoinArcPageState extends State<MemberCoinArcPage> {
|
|||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
top: false,
|
top: false,
|
||||||
bottom: false,
|
bottom: false,
|
||||||
|
child: refreshIndicator(
|
||||||
|
onRefresh: _ctr.onRefresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
@@ -57,6 +61,7 @@ class _MemberCoinArcPageState extends State<MemberCoinArcPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class _MemberComicState extends State<MemberComic>
|
|||||||
return refreshIndicator(
|
return refreshIndicator(
|
||||||
onRefresh: _controller.onRefresh,
|
onRefresh: _controller.onRefresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:PiliPlus/common/constants.dart';
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
import 'package:PiliPlus/common/skeleton/video_card_v.dart';
|
import 'package:PiliPlus/common/skeleton/video_card_v.dart';
|
||||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models_new/member/coin_like_arc/item.dart';
|
import 'package:PiliPlus/models_new/member/coin_like_arc/item.dart';
|
||||||
import 'package:PiliPlus/pages/member_coin_arc/widgets/item.dart';
|
import 'package:PiliPlus/pages/member_coin_arc/widgets/item.dart';
|
||||||
@@ -43,7 +44,10 @@ class _MemberLikeArcPageState extends State<MemberLikeArcPage> {
|
|||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
top: false,
|
top: false,
|
||||||
bottom: false,
|
bottom: false,
|
||||||
|
child: refreshIndicator(
|
||||||
|
onRefresh: _ctr.onRefresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
@@ -57,6 +61,7 @@ class _MemberLikeArcPageState extends State<MemberLikeArcPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class _UpowerRankPageState extends State<UpowerRankPage>
|
|||||||
onRefresh: _controller.onRefresh,
|
onRefresh: _controller.onRefresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
controller: _controller.scrollController,
|
controller: _controller.scrollController,
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ class PgcIntroController extends CommonIntroController {
|
|||||||
RxBool isFollowed = false.obs;
|
RxBool isFollowed = false.obs;
|
||||||
RxInt followStatus = (-1).obs;
|
RxInt followStatus = (-1).obs;
|
||||||
|
|
||||||
Future<void> queryIsFollowed() async {
|
void queryIsFollowed() {
|
||||||
// try {
|
// try {
|
||||||
// var result = await Request().get(
|
// var result = await Request().get(
|
||||||
// 'https://www.bilibili.com/bangumi/play/ss$seasonId',
|
// 'https://www.bilibili.com/bangumi/play/ss$seasonId',
|
||||||
@@ -513,8 +513,9 @@ class PgcIntroController extends CommonIntroController {
|
|||||||
ViewGrpc.view(bvid: bvid).then((res) {
|
ViewGrpc.view(bvid: bvid).then((res) {
|
||||||
if (res.isSuccess) {
|
if (res.isSuccess) {
|
||||||
ViewPgcAny view = ViewPgcAny.fromBuffer(res.data.supplement.value);
|
ViewPgcAny view = ViewPgcAny.fromBuffer(res.data.supplement.value);
|
||||||
isFollowed.value = view.ogvData.userStatus.follow == 1;
|
var userStatus = view.ogvData.userStatus;
|
||||||
followStatus.value = view.ogvData.userStatus.followStatus;
|
isFollowed.value = userStatus.follow == 1;
|
||||||
|
followStatus.value = userStatus.followStatus;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -344,11 +344,13 @@ class RequestUtils {
|
|||||||
if (res['status']) {
|
if (res['status']) {
|
||||||
SmartDialog.showToast(!status ? '点赞成功' : '取消赞');
|
SmartDialog.showToast(!status ? '点赞成功' : '取消赞');
|
||||||
if (up == 1) {
|
if (up == 1) {
|
||||||
like?.count = count + 1;
|
like
|
||||||
like?.status = true;
|
?..count = count + 1
|
||||||
|
..status = true;
|
||||||
} else {
|
} else {
|
||||||
like?.count = count - 1;
|
like
|
||||||
like?.status = false;
|
?..count = count - 1
|
||||||
|
..status = false;
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user