🐛 Fix remain bugs

This commit is contained in:
LittleSheep 2025-04-01 22:36:06 +08:00
parent 1ad42e6505
commit 00863b94e8
3 changed files with 5 additions and 13 deletions

View File

@ -255,8 +255,9 @@ class PostWriteController extends ChangeNotifier {
List.from(post.categories.map((ele) => ele.alias), growable: true); List.from(post.categories.map((ele) => ele.alias), growable: true);
attachments.addAll( attachments.addAll(
post.body['attachments'] post.body['attachments']
?.where((ele) => SnAttachment.fromJson(ele)) ?.map((ele) => SnAttachment.fromJson(ele))
?.map(PostWriteMedia) ?? ?.map((ele) => PostWriteMedia(ele))
?.cast<PostWriteMedia>() ??
[], [],
); );
poll = post.poll; poll = post.poll;

View File

@ -11,7 +11,6 @@ import 'package:styled_widget/styled_widget.dart';
import 'package:surface/providers/notification.dart'; import 'package:surface/providers/notification.dart';
import 'package:surface/providers/sn_network.dart'; import 'package:surface/providers/sn_network.dart';
import 'package:surface/types/notification.dart'; import 'package:surface/types/notification.dart';
import 'package:surface/widgets/app_bar_leading.dart';
import 'package:surface/widgets/dialog.dart'; import 'package:surface/widgets/dialog.dart';
import 'package:surface/widgets/loading_indicator.dart'; import 'package:surface/widgets/loading_indicator.dart';
import 'package:surface/widgets/markdown_content.dart'; import 'package:surface/widgets/markdown_content.dart';
@ -156,7 +155,7 @@ class _NotificationScreenState extends State<NotificationScreen> {
return AppScaffold( return AppScaffold(
appBar: AppBar( appBar: AppBar(
leading: AutoAppBarLeading(), leading: PageBackButton(),
title: Text('screenNotification').tr(), title: Text('screenNotification').tr(),
actions: [ actions: [
IconButton( IconButton(

View File

@ -100,6 +100,7 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
contentPadding: EdgeInsets.symmetric(horizontal: 24), contentPadding: EdgeInsets.symmetric(horizontal: 24),
leading: AccountImage( leading: AccountImage(
content: ua.user?.avatar, content: ua.user?.avatar,
backgroundColor: Colors.transparent,
fallbackWidget: fallbackWidget:
ua.isAuthorized ? null : const Icon(Symbols.login), ua.isAuthorized ? null : const Icon(Symbols.login),
), ),
@ -122,15 +123,6 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
Scaffold.of(context).closeDrawer(); Scaffold.of(context).closeDrawer();
}, },
), ),
IconButton(
icon: const Icon(Symbols.settings, fill: 1),
padding: EdgeInsets.zero,
visualDensity: VisualDensity.compact,
onPressed: () {
GoRouter.of(context).pushNamed('settings');
Scaffold.of(context).closeDrawer();
},
),
], ],
), ),
onTap: () { onTap: () {