diff --git a/lib/pages/setting/sponsor_block_page.dart b/lib/pages/setting/sponsor_block_page.dart index 95499400..170b5881 100644 --- a/lib/pages/setting/sponsor_block_page.dart +++ b/lib/pages/setting/sponsor_block_page.dart @@ -572,10 +572,12 @@ class SlideColorPicker extends StatefulWidget { super.key, required this.color, required this.callback, + this.showResetBtn, }); final Color color; final Function(Color? color) callback; + final bool? showResetBtn; @override State createState() => _SlideColorPickerState(); @@ -703,17 +705,19 @@ class _SlideColorPickerState extends State { ), Row( children: [ - const SizedBox(width: 16), - TextButton( - onPressed: () { - Get.back(); - widget.callback(null); - }, - child: Text( - '重置', + if (widget.showResetBtn != false) ...[ + const SizedBox(width: 16), + TextButton( + onPressed: () { + Get.back(); + widget.callback(null); + }, + child: Text( + '重置', + ), ), - ), - const Spacer(), + const Spacer(), + ], TextButton( onPressed: Get.back, child: Text( diff --git a/lib/pages/video/detail/widgets/send_danmaku_panel.dart b/lib/pages/video/detail/widgets/send_danmaku_panel.dart index f9d59022..102215f8 100644 --- a/lib/pages/video/detail/widgets/send_danmaku_panel.dart +++ b/lib/pages/video/detail/widgets/send_danmaku_panel.dart @@ -530,8 +530,12 @@ class _SendDanmakuPanelState extends State widget.callback( DanmakuContentItem( _textController.text, - color: Colors.white, - type: DanmakuItemType.scroll, + color: _color.value, + type: switch (_mode.value) { + 5 => DanmakuItemType.top, + 4 => DanmakuItemType.bottom, + _ => DanmakuItemType.scroll, + }, selfSend: true, ), ); @@ -575,6 +579,7 @@ class _SendDanmakuPanelState extends State ), ), content: SlideColorPicker( + showResetBtn: false, color: _color.value, callback: (Color? color) { if (color != null) {