mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix save reply
opt profile page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -61,7 +61,7 @@ class HotVideoItemModel extends BaseRecVideoItemModel with MultiSelectData {
|
||||
class HotStat extends Stat {
|
||||
int? reply;
|
||||
int? favorite;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? share;
|
||||
int? nowRank;
|
||||
int? hisRank;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class PgcLCF {
|
||||
int? coinNumber;
|
||||
num? coinNumber;
|
||||
int? favorite;
|
||||
int? isOriginal;
|
||||
int? like;
|
||||
|
||||
@@ -2,7 +2,7 @@ class AccountMyInfoData {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? sign;
|
||||
int? coins;
|
||||
num? coins;
|
||||
String? birthday;
|
||||
String? face;
|
||||
int? faceNftNew;
|
||||
@@ -46,7 +46,7 @@ class AccountMyInfoData {
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
coins: json['coins'] as int?,
|
||||
coins: json['coins'] as num?,
|
||||
birthday: json['birthday'] as String?,
|
||||
face: json['face'] as String?,
|
||||
faceNftNew: json['face_nft_new'] as int?,
|
||||
|
||||
@@ -5,7 +5,7 @@ class ArticleInfoData {
|
||||
int? like;
|
||||
bool? attention;
|
||||
bool? favorite;
|
||||
int? coin;
|
||||
num? coin;
|
||||
Stats? stats;
|
||||
String? title;
|
||||
String? bannerUrl;
|
||||
@@ -57,7 +57,7 @@ class ArticleInfoData {
|
||||
like: json['like'] as int?,
|
||||
attention: json['attention'] as bool?,
|
||||
favorite: json['favorite'] as bool?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
|
||||
@@ -5,7 +5,7 @@ class Stats {
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
@@ -26,7 +26,7 @@ class Stats {
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class Stats {
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
@@ -26,7 +26,7 @@ class Stats {
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class Stats {
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
@@ -26,7 +26,7 @@ class Stats {
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ class CntInfo {
|
||||
int? share;
|
||||
int? reply;
|
||||
int? danmaku;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? vt;
|
||||
int? playSwitch;
|
||||
String? viewText1;
|
||||
@@ -33,7 +33,7 @@ class CntInfo {
|
||||
share: json['share'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
vt: json['vt'] as int?,
|
||||
playSwitch: json['play_switch'] as int?,
|
||||
viewText1: json['view_text_1'] as String?,
|
||||
|
||||
@@ -3,7 +3,7 @@ class Stat {
|
||||
int? view;
|
||||
int? danmaku;
|
||||
int? reply;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? seriesFollow;
|
||||
int? seriesView;
|
||||
int? likes;
|
||||
@@ -26,7 +26,7 @@ class Stat {
|
||||
view: json['view'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
seriesFollow: json['series_follow'] as int?,
|
||||
seriesView: json['series_view'] as int?,
|
||||
likes: json['likes'] as int?,
|
||||
|
||||
@@ -4,7 +4,7 @@ class Stat {
|
||||
int? danmaku;
|
||||
int? reply;
|
||||
int? favorite;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? share;
|
||||
int? nowRank;
|
||||
int? hisRank;
|
||||
@@ -35,7 +35,7 @@ class Stat {
|
||||
danmaku: json['danmaku'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
share: json['share'] as int?,
|
||||
nowRank: json['now_rank'] as int?,
|
||||
hisRank: json['his_rank'] as int?,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
class Coin {
|
||||
int? maxNum;
|
||||
int? coinNumber;
|
||||
num? maxNum;
|
||||
num? coinNumber;
|
||||
|
||||
Coin({this.maxNum, this.coinNumber});
|
||||
|
||||
factory Coin.fromJson(Map<String, dynamic> json) => Coin(
|
||||
maxNum: json['max_num'] as int?,
|
||||
coinNumber: json['coin_number'] as int?,
|
||||
maxNum: json['max_num'] as num?,
|
||||
coinNumber: json['coin_number'] as num?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Stat {
|
||||
int? coins;
|
||||
num? coins;
|
||||
int? danmakus;
|
||||
int? favorite;
|
||||
int? favorites;
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:PiliPlus/models_new/pgc/pgc_info_model/danmaku.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/vt.dart';
|
||||
|
||||
class StatForUnity {
|
||||
int? coin;
|
||||
num? coin;
|
||||
Danmaku? danmaku;
|
||||
int? likes;
|
||||
int? reply;
|
||||
@@ -11,7 +11,7 @@ class StatForUnity {
|
||||
StatForUnity({this.coin, this.danmaku, this.likes, this.reply, this.vt});
|
||||
|
||||
factory StatForUnity.fromJson(Map<String, dynamic> json) => StatForUnity(
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
danmaku: json['danmaku'] == null
|
||||
? null
|
||||
: Danmaku.fromJson(json['danmaku'] as Map<String, dynamic>),
|
||||
|
||||
@@ -5,7 +5,7 @@ class Stats {
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
@@ -26,7 +26,7 @@ class Stats {
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class Stats {
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
@@ -26,7 +26,7 @@ class Stats {
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class SpaceAudioItem {
|
||||
int? limit;
|
||||
int? activityId;
|
||||
String? limitdesc;
|
||||
int? coinNum;
|
||||
num? coinNum;
|
||||
int? ctime;
|
||||
Statistic? statistic;
|
||||
dynamic vipInfo;
|
||||
@@ -78,7 +78,7 @@ class SpaceAudioItem {
|
||||
limit: json['limit'] as int?,
|
||||
activityId: json['activityId'] as int?,
|
||||
limitdesc: json['limitdesc'] as String?,
|
||||
coinNum: json['coin_num'] as int?,
|
||||
coinNum: json['coin_num'] as num?,
|
||||
ctime: json['ctime'] as int?,
|
||||
statistic: json['statistic'] == null
|
||||
? null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class PgcTriple {
|
||||
int? coin;
|
||||
int? coinNumber;
|
||||
num? coin;
|
||||
num? coinNumber;
|
||||
int? favorite;
|
||||
int? fmid;
|
||||
int? follow;
|
||||
|
||||
@@ -4,7 +4,7 @@ class Stat {
|
||||
int? danmaku;
|
||||
int? reply;
|
||||
int? favorite;
|
||||
int? coin;
|
||||
num? coin;
|
||||
int? share;
|
||||
int? nowRank;
|
||||
int? hisRank;
|
||||
@@ -35,7 +35,7 @@ class Stat {
|
||||
danmaku: json['danmaku'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
share: json['share'] as int?,
|
||||
nowRank: json['now_rank'] as int?,
|
||||
hisRank: json['his_rank'] as int?,
|
||||
|
||||
@@ -4,7 +4,7 @@ class VideoRelation {
|
||||
bool? seasonFav;
|
||||
bool? like;
|
||||
bool? dislike;
|
||||
int? coin;
|
||||
num? coin;
|
||||
|
||||
VideoRelation({
|
||||
this.attention,
|
||||
@@ -21,6 +21,6 @@ class VideoRelation {
|
||||
seasonFav: json['season_fav'] as bool?,
|
||||
like: json['like'] as bool?,
|
||||
dislike: json['dislike'] as bool?,
|
||||
coin: json['coin'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ abstract class CommonIntroController extends GetxController {
|
||||
// 是否点赞
|
||||
RxBool hasLike = false.obs;
|
||||
// 投币数量
|
||||
final RxInt coinNum = 0.obs;
|
||||
final RxNum coinNum = RxNum(0);
|
||||
// 是否投币
|
||||
bool get hasCoin => coinNum.value != 0;
|
||||
// 是否收藏
|
||||
|
||||
@@ -131,6 +131,8 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 5),
|
||||
child: ClipOval(
|
||||
child: CachedNetworkImage(
|
||||
width: 55,
|
||||
height: 55,
|
||||
imageUrl: ImageUtil.thumbnailUrl(response.face),
|
||||
),
|
||||
),
|
||||
@@ -190,11 +192,11 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
_item(
|
||||
theme: theme,
|
||||
title: '个性签名',
|
||||
text: response.sign.isNullOrEmpty ? '无' : response.sign!,
|
||||
text: response.sign,
|
||||
onTap: () => _editDialog(
|
||||
type: ProfileType.sign,
|
||||
title: '个性签名',
|
||||
text: response.sign!,
|
||||
text: response.sign ?? '',
|
||||
),
|
||||
),
|
||||
divider1,
|
||||
@@ -273,6 +275,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
required String text,
|
||||
}) {
|
||||
_textController.text = text;
|
||||
final lines = type == ProfileType.uname ? 1 : 4;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
@@ -281,8 +284,8 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
title: Text('修改$title'),
|
||||
content: TextField(
|
||||
controller: _textController,
|
||||
minLines: type == ProfileType.uname ? 1 : 4,
|
||||
maxLines: type == ProfileType.uname ? 1 : 4,
|
||||
minLines: lines,
|
||||
maxLines: lines,
|
||||
autofocus: true,
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textInputAction:
|
||||
@@ -427,18 +430,20 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
if (text != null)
|
||||
Text(
|
||||
text,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: theme.colorScheme.outline,
|
||||
Flexible(
|
||||
child: Text(
|
||||
text,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
)
|
||||
else if (widget != null)
|
||||
@@ -448,6 +453,8 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
Icons.keyboard_arrow_right,
|
||||
color: theme.colorScheme.outline,
|
||||
)
|
||||
else
|
||||
const SizedBox(width: 24)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -368,10 +368,9 @@ class _SavePanelState extends State<SavePanel> {
|
||||
if (pubdate != null) ...[
|
||||
const Spacer(),
|
||||
Text(
|
||||
DateTime.fromMillisecondsSinceEpoch(
|
||||
pubdate! * 1000)
|
||||
.toString()
|
||||
.substring(0, 19),
|
||||
DateUtil.format(pubdate,
|
||||
format:
|
||||
DateUtil.longFormatDs),
|
||||
style: TextStyle(
|
||||
color:
|
||||
theme.colorScheme.outline,
|
||||
|
||||
@@ -238,7 +238,8 @@ class ReplyItemGrpc extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
Text(
|
||||
replyLevel == 0
|
||||
? DateUtil.longFormatDs.format(DateTime.now())
|
||||
? DateUtil.format(replyItem.ctime.toInt(),
|
||||
format: DateUtil.longFormatDs)
|
||||
: DateUtil.dateFormat(replyItem.ctime.toInt()),
|
||||
style: TextStyle(
|
||||
fontSize: theme.textTheme.labelSmall!.fontSize,
|
||||
|
||||
Reference in New Issue
Block a user