mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-05 09:37:52 +08:00
feat: add copy/move support to fav/later search results (#1822)
* feat: add copy/move support to fav/later search results * update Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -4,7 +4,6 @@ import 'package:PiliPlus/common/widgets/gesture/horizontal_drag_gesture_recogniz
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||
import 'package:PiliPlus/common/widgets/view_safe_area.dart';
|
||||
import 'package:PiliPlus/models/common/later_view_type.dart';
|
||||
import 'package:PiliPlus/models_new/later/data.dart';
|
||||
import 'package:PiliPlus/models_new/later/list.dart';
|
||||
import 'package:PiliPlus/pages/fav_detail/view.dart';
|
||||
import 'package:PiliPlus/pages/later/base_controller.dart';
|
||||
@@ -154,16 +153,17 @@ class _LaterPageState extends State<LaterPage>
|
||||
PreferredSizeWidget _buildAppbar(bool enableMultiSelect) {
|
||||
final theme = Theme.of(context);
|
||||
Color color = theme.colorScheme.secondary;
|
||||
|
||||
final btnStyle = TextButton.styleFrom(visualDensity: .compact);
|
||||
final textStyle = TextStyle(color: theme.colorScheme.onSurfaceVariant);
|
||||
return MultiSelectAppBarWidget(
|
||||
visible: enableMultiSelect,
|
||||
ctr: currCtr(),
|
||||
actions: [
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(visualDensity: .compact),
|
||||
style: btnStyle,
|
||||
onPressed: () {
|
||||
final ctr = currCtr();
|
||||
RequestUtils.onCopyOrMove<LaterData, LaterItemModel>(
|
||||
RequestUtils.onCopyOrMove<LaterItemModel>(
|
||||
context: context,
|
||||
isCopy: true,
|
||||
ctr: ctr,
|
||||
@@ -171,16 +171,13 @@ class _LaterPageState extends State<LaterPage>
|
||||
mid: ctr.mid,
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
'复制',
|
||||
style: TextStyle(color: theme.colorScheme.onSurfaceVariant),
|
||||
),
|
||||
child: Text('复制', style: textStyle),
|
||||
),
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(visualDensity: .compact),
|
||||
style: btnStyle,
|
||||
onPressed: () {
|
||||
final ctr = currCtr();
|
||||
RequestUtils.onCopyOrMove<LaterData, LaterItemModel>(
|
||||
RequestUtils.onCopyOrMove<LaterItemModel>(
|
||||
context: context,
|
||||
isCopy: false,
|
||||
ctr: ctr,
|
||||
@@ -188,10 +185,7 @@ class _LaterPageState extends State<LaterPage>
|
||||
mid: ctr.mid,
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
'移动',
|
||||
style: TextStyle(color: theme.colorScheme.onSurfaceVariant),
|
||||
),
|
||||
child: Text('移动', style: textStyle),
|
||||
),
|
||||
],
|
||||
child: AppBar(
|
||||
|
||||
Reference in New Issue
Block a user