mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 03:15:14 +08:00
Add multi-select support to pmshare panel (#1779)
* Add multi-select support to share panel - Replace single selection index with per-user selected flag - Allow sending to multiple selected users - Add sending state to prevent multiple clicks - Update default selection logic to mark first user as selected * 简化代码逻辑 * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Signed-off-by: lesetong <oscarlbw@qq.com> Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -62,7 +62,6 @@ abstract class PageUtils {
|
||||
}) async {
|
||||
// if (kDebugMode) debugPrint(content.toString());
|
||||
|
||||
int? selectedIndex;
|
||||
List<UserModel> userList = <UserModel>[];
|
||||
|
||||
final shareListRes = await ImGrpc.shareList(size: 3);
|
||||
@@ -77,11 +76,10 @@ abstract class PageUtils {
|
||||
),
|
||||
);
|
||||
} else if (context.mounted) {
|
||||
UserModel? userModel = await Navigator.of(context).push(
|
||||
final UserModel? userModel = await Navigator.of(context).push(
|
||||
GetPageRoute(page: () => const ContactPage()),
|
||||
);
|
||||
if (userModel != null) {
|
||||
selectedIndex = 0;
|
||||
userList.add(userModel);
|
||||
}
|
||||
}
|
||||
@@ -92,7 +90,6 @@ abstract class PageUtils {
|
||||
builder: (context) => SharePanel(
|
||||
content: content,
|
||||
userList: userList,
|
||||
selectedIndex: selectedIndex,
|
||||
),
|
||||
useSafeArea: true,
|
||||
enableDrag: false,
|
||||
|
||||
Reference in New Issue
Block a user