mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 20:16:26 +08:00
fix save reply
opt profile page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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