mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: dyn pubtime
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -39,6 +39,9 @@ class AuthorPanel extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
String? pubTime = item.modules.moduleAuthor.pubTs != null
|
||||||
|
? Utils.dateFormat(item.modules.moduleAuthor.pubTs)
|
||||||
|
: item.modules.moduleAuthor.pubTime;
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
@@ -89,22 +92,15 @@ class AuthorPanel extends StatelessWidget {
|
|||||||
Theme.of(context).textTheme.titleSmall!.fontSize,
|
Theme.of(context).textTheme.titleSmall!.fontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
DefaultTextStyle.merge(
|
if (pubTime != null)
|
||||||
|
Text(
|
||||||
|
'$pubTime${item.modules.moduleAuthor.pubAction != null ? ' ${item.modules.moduleAuthor.pubAction}' : ''}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).colorScheme.outline,
|
color: Theme.of(context).colorScheme.outline,
|
||||||
fontSize:
|
fontSize:
|
||||||
Theme.of(context).textTheme.labelSmall!.fontSize,
|
Theme.of(context).textTheme.labelSmall!.fontSize,
|
||||||
),
|
),
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Text(Utils.dateFormat(item.modules.moduleAuthor.pubTs)),
|
|
||||||
if (item.modules.moduleAuthor.pubTs != '' &&
|
|
||||||
item.modules.moduleAuthor.pubAction != '')
|
|
||||||
const Text(' '),
|
|
||||||
Text(item.modules.moduleAuthor.pubAction),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user