mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 16:46:22 +08:00
opt member fav
fix parse duration Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -142,8 +142,8 @@ class _MemberPageState extends State<MemberPage> {
|
|||||||
if (_userController.accountService.isLogin.value)
|
if (_userController.accountService.isLogin.value)
|
||||||
if (_userController.mid ==
|
if (_userController.mid ==
|
||||||
_userController.accountService.mid) ...[
|
_userController.accountService.mid) ...[
|
||||||
if ((_userController
|
if ((_userController.loadingState.value.dataOrNull?.card?.vip
|
||||||
.loadingState.value.data?.card?.vip?.status ??
|
?.status ??
|
||||||
0) >
|
0) >
|
||||||
0)
|
0)
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class MemberFavItem extends StatelessWidget {
|
|||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (item.type == 2) {
|
if (item.type == 2 || item.type == 0 || item.type == 11) {
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/favDetail',
|
'/favDetail',
|
||||||
parameters: {
|
parameters: {
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ class DurationUtil {
|
|||||||
: "${h.toString().padLeft(2, '0')}:${m.toString().padLeft(2, '0')}:$sms";
|
: "${h.toString().padLeft(2, '0')}:${m.toString().padLeft(2, '0')}:$sms";
|
||||||
}
|
}
|
||||||
|
|
||||||
static int parseDuration(String data) {
|
static int parseDuration(String? data) {
|
||||||
|
if (data == null || data.isEmpty) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
List<int> split =
|
List<int> split =
|
||||||
data.split(':').reversed.map((e) => int.parse(e)).toList();
|
data.split(':').reversed.map((e) => int.parse(e)).toList();
|
||||||
int duration = 0;
|
int duration = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user