Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Merge branch 'main' into avatar-person-contact-cleanup

Neeraj Gupta37a0d65ac26b
diff --cc mobile/apps/locker/lib/ui/sharing/add_email_bottom_sheet.dart
index 095e1cffd2,28dbfb54c5..238948df37
--- a/mobile/apps/locker/lib/ui/sharing/add_email_bottom_sheet.dart
+++ b/mobile/apps/locker/lib/ui/sharing/add_email_bottom_sheet.dart
@@@ -165,51 -162,40 +162,40 @@@ class _AddEmailSheetState extends State
controller: _scrollController,
shrinkWrap: true,
padding: EdgeInsets.zero,
- itemCount: filteredUsers.length,
- itemBuilder: (context, index) {
- final user = filteredUsers[index];
- final isFirst = index == 0;
- final isLast = index == filteredUsers.length - 1;
- return Column(
- children: [
- if (!isFirst)
- DividerWidget(
- dividerType: DividerType.menu,
- bgColor: colors.fillLight,
- ),
- MenuItemWidgetV2(
- captionedTextWidget: CaptionedTextWidgetV2(
- title: user.resolvedDisplayName,
- ),
- leadingIconSize: 24.0,
- leadingIconWidget: UserAvatarWidget.suggestion(
- user,
- type: AvatarType.mini,
- config: Configuration.instance,
- ),
- menuItemColor: colors.fillLight,
- surfaceExecutionStates: false,
- onTap: () async {
- _textFieldFocusNode.unfocus();
- _textController.text = user.email;
- _email = user.email;
- _emailIsValid = true;
- setState(() {});
- },
- onLongPress: () {
- showVerifyIdentitySheet(
- context,
- self: false,
- config: Configuration.instance,
- email: user.email,
- );
- },
- isTopBorderRadiusRemoved: !isFirst,
- isBottomBorderRadiusRemoved: !isLast,
- ),
- ],
- );
- },
+ children: [
+ MenuGroupComponent(
+ backgroundColor: colors.fillLight,
+ showDividers: true,
+ dividerPadding: const EdgeInsets.only(left: 48),
+ items: filteredUsers
+ .map(
+ (user) => MenuComponent(
+ title: user.resolvedDisplayName,
- leading: UserAvatarWidget(
++ leading: UserAvatarWidget.suggestion(
+ user,
+ type: AvatarType.mini,
+ config: Configuration.instance,
+ ),
+ onTap: () async {
+ _textFieldFocusNode.unfocus();
+ _textController.text = user.email;
+ _email = user.email;
+ _emailIsValid = true;
+ setState(() {});
+ },
+ onLongPress: () {
+ showVerifyIdentitySheet(
+ context,
+ self: false,
+ config: Configuration.instance,
+ email: user.email,
+ );
+ },
+ ),
+ )
+ .toList(),
+ ),
+ ],
),
),
),
diff --cc mobile/apps/locker/lib/ui/sharing/share_collection_bottom_sheet.dart
index 91efd36818,2246156bab..389f3f6ce5
--- a/mobile/apps/locker/lib/ui/sharing/share_collection_bottom_sheet.dart
+++ b/mobile/apps/locker/lib/ui/sharing/share_collection_bottom_sheet.dart
@@@ -120,29 -118,20 +117,19 @@@ class _ShareCollectionSheetState extend
controller: _scrollController,
shrinkWrap: true,
padding: EdgeInsets.zero,
- itemCount: allUsers.length,
- itemBuilder: (context, index) {
- final user = allUsers[index];
- final isFirst = index == 0;
- final isLast = index == allUsers.length - 1;
- final role = CollectionParticipantRoleExtn.fromString(
- user.role,
- );
-
- return Column(
- children: [
- if (!isFirst)
- DividerWidget(
- dividerType: DividerType.menu,
- bgColor: colors.fillLight,
- ),
- MenuItemWidgetV2(
- captionedTextWidget: CaptionedTextWidgetV2(
- title: user.email,
- ),
- leadingIconSize: 24,
- leadingIconWidget: UserAvatarWidget(
+ children: [
+ MenuGroupComponent(
+ backgroundColor: colors.fillLight,
+ showDividers: true,
+ dividerPadding: const EdgeInsets.only(left: 48),
+ items: allUsers.map((user) {
+ final role = CollectionParticipantRoleExtn.fromString(
+ user.role,
+ );
+ return MenuComponent(
+ title: user.email,
+ leading: UserAvatarWidget(
user,
- currentUserID: currentUserId,
config: Configuration.instance,
type: AvatarType.mini,
),