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