diff --git a/lib/controllers/post_write_controller.dart b/lib/controllers/post_write_controller.dart index fe0c04b..020f0a3 100644 --- a/lib/controllers/post_write_controller.dart +++ b/lib/controllers/post_write_controller.dart @@ -255,8 +255,9 @@ class PostWriteController extends ChangeNotifier { List.from(post.categories.map((ele) => ele.alias), growable: true); attachments.addAll( post.body['attachments'] - ?.where((ele) => SnAttachment.fromJson(ele)) - ?.map(PostWriteMedia) ?? + ?.map((ele) => SnAttachment.fromJson(ele)) + ?.map((ele) => PostWriteMedia(ele)) + ?.cast() ?? [], ); poll = post.poll; diff --git a/lib/screens/notification.dart b/lib/screens/notification.dart index 1b3790f..778f7f0 100644 --- a/lib/screens/notification.dart +++ b/lib/screens/notification.dart @@ -11,7 +11,6 @@ import 'package:styled_widget/styled_widget.dart'; import 'package:surface/providers/notification.dart'; import 'package:surface/providers/sn_network.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/loading_indicator.dart'; import 'package:surface/widgets/markdown_content.dart'; @@ -156,7 +155,7 @@ class _NotificationScreenState extends State { return AppScaffold( appBar: AppBar( - leading: AutoAppBarLeading(), + leading: PageBackButton(), title: Text('screenNotification').tr(), actions: [ IconButton( diff --git a/lib/widgets/navigation/app_drawer_navigation.dart b/lib/widgets/navigation/app_drawer_navigation.dart index 69dd29b..2984f9f 100644 --- a/lib/widgets/navigation/app_drawer_navigation.dart +++ b/lib/widgets/navigation/app_drawer_navigation.dart @@ -100,6 +100,7 @@ class _AppNavigationDrawerState extends State { contentPadding: EdgeInsets.symmetric(horizontal: 24), leading: AccountImage( content: ua.user?.avatar, + backgroundColor: Colors.transparent, fallbackWidget: ua.isAuthorized ? null : const Icon(Symbols.login), ), @@ -122,15 +123,6 @@ class _AppNavigationDrawerState extends State { 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: () {