🐛 Fixes articles bugs

This commit is contained in:
LittleSheep 2025-07-02 23:57:07 +08:00
parent f479b9fc8b
commit 050750a808
2 changed files with 18 additions and 10 deletions

View File

@ -324,9 +324,7 @@ class CreatorHubScreen extends HookConsumerWidget {
subtitle: Text('createPublisherHint').tr(),
trailing: const Icon(Symbols.chevron_right),
onTap: () {
context.push('/creators/publishers/new').then((
value,
) {
context.push('/creators/new').then((value) {
if (value != null) {
ref.invalidate(publishersManagedProvider);
}

View File

@ -238,7 +238,7 @@ class ArticleComposeScreen extends HookConsumerWidget {
children: [
// Publisher row
Card(
margin: EdgeInsets.only(bottom: 8),
margin: EdgeInsets.only(top: 8),
elevation: 1,
child: Padding(
padding: const EdgeInsets.all(12),
@ -265,11 +265,21 @@ class ArticleComposeScreen extends HookConsumerWidget {
});
},
),
const Gap(12),
const Gap(16),
if (state.currentPublisher.value == null)
Text(
state.currentPublisher.value?.name ??
'postPublisherUnselected'.tr(),
style: theme.textTheme.bodyMedium,
)
else
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(state.currentPublisher.value!.nick).bold(),
Text(
'@${state.currentPublisher.value!.name}',
).fontSize(12),
],
),
],
),