diff --git a/lib/pages/bangumi/introduction/controller.dart b/lib/pages/bangumi/introduction/controller.dart index f2ed6a40..99edbd73 100644 --- a/lib/pages/bangumi/introduction/controller.dart +++ b/lib/pages/bangumi/introduction/controller.dart @@ -102,7 +102,7 @@ class BangumiIntroController extends CommonController { var result = await UserHttp.videoTags(bvid: bvid); if (result['status']) { videoTags = result['data']; - debugPrint('tags: ${result['data']}'); + // debugPrint('tags: ${result['data']}'); } } diff --git a/lib/pages/dynamics/view.dart b/lib/pages/dynamics/view.dart index 8c7be0dd..3ddbcfeb 100644 --- a/lib/pages/dynamics/view.dart +++ b/lib/pages/dynamics/view.dart @@ -35,6 +35,39 @@ class _DynamicsPageState extends State @override bool get wantKeepAlive => true; + Widget _createDynamicBtn([bool isRight = true]) => Center( + child: Container( + width: 34, + height: 34, + margin: + EdgeInsets.only(left: !isRight ? 16 : 0, right: isRight ? 16 : 0), + child: IconButton( + tooltip: '发布动态', + style: ButtonStyle( + padding: WidgetStateProperty.all(EdgeInsets.zero), + backgroundColor: WidgetStateProperty.resolveWith((states) { + return Theme.of(context).colorScheme.secondaryContainer; + }), + ), + onPressed: () { + if (GStorage.userInfo.get('userInfoCache') != null) { + showModalBottomSheet( + context: context, + useSafeArea: true, + isScrollControlled: true, + builder: (_) => const CreatePanel(), + ); + } + }, + icon: Icon( + Icons.add, + size: 18, + color: Theme.of(context).colorScheme.onSecondaryContainer, + ), + ), + ), + ); + @override void initState() { super.initState(); @@ -123,6 +156,10 @@ class _DynamicsPageState extends State return Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( + leading: upPanelPosition == UpPanelPosition.rightDrawer + ? _createDynamicBtn(false) + : null, + leadingWidth: 50, toolbarHeight: 50, elevation: 0, backgroundColor: Colors.transparent, @@ -157,37 +194,9 @@ class _DynamicsPageState extends State }, ), ), - actions: [ - Container( - width: 34, - height: 34, - margin: const EdgeInsets.only(right: 16), - child: IconButton( - tooltip: '发布动态', - style: ButtonStyle( - padding: WidgetStateProperty.all(EdgeInsets.zero), - backgroundColor: WidgetStateProperty.resolveWith((states) { - return Theme.of(context).colorScheme.secondaryContainer; - }), - ), - onPressed: () { - if (GStorage.userInfo.get('userInfoCache') != null) { - showModalBottomSheet( - context: context, - useSafeArea: true, - isScrollControlled: true, - builder: (_) => const CreatePanel(), - ); - } - }, - icon: Icon( - Icons.add, - size: 18, - color: Theme.of(context).colorScheme.onSecondaryContainer, - ), - ), - ), - ], + actions: upPanelPosition == UpPanelPosition.rightDrawer + ? null + : [_createDynamicBtn()], ), drawer: upPanelPosition == UpPanelPosition.leftDrawer ? SafeArea(child: upPanelPart()) diff --git a/lib/pages/video/detail/introduction/controller.dart b/lib/pages/video/detail/introduction/controller.dart index 1c1611c4..1f8159de 100644 --- a/lib/pages/video/detail/introduction/controller.dart +++ b/lib/pages/video/detail/introduction/controller.dart @@ -167,7 +167,7 @@ class VideoIntroController extends GetxController { var result = await UserHttp.videoTags(bvid: bvid); if (result['status']) { videoTags = result['data']; - debugPrint('tags: ${result['data']}'); + // debugPrint('tags: ${result['data']}'); } }