[mob][photos] Increase "Add name" hitpoint

This commit is contained in:
laurenspriem 2024-05-11 14:53:19 +05:30
parent 3ab2535193
commit abff589c21

View file

@ -80,9 +80,7 @@ class _SearchSectionState extends State<SearchSection> {
debugPrint("Building section for ${widget.sectionType.name}"); debugPrint("Building section for ${widget.sectionType.name}");
final shouldShowMore = _examples.length >= widget.limit - 1; final shouldShowMore = _examples.length >= widget.limit - 1;
final textTheme = getEnteTextTheme(context); final textTheme = getEnteTextTheme(context);
return Padding( return _examples.isNotEmpty
padding: const EdgeInsets.symmetric(vertical: 8),
child: _examples.isNotEmpty
? GestureDetector( ? GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
@ -151,7 +149,6 @@ class _SearchSectionState extends State<SearchSection> {
SearchSectionEmptyCTAIcon(widget.sectionType), SearchSectionEmptyCTAIcon(widget.sectionType),
], ],
), ),
),
); );
} }
} }
@ -231,7 +228,7 @@ class SearchExample extends StatelessWidget {
child: SizedBox( child: SizedBox(
width: width, width: width,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 10), padding: const EdgeInsets.only(left: 6, right: 6, top: 8),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
@ -260,11 +257,9 @@ class SearchExample extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(
height: 10,
),
isCluster isCluster
? GestureDetector( ? GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () async { onTap: () async {
final result = await showAssignPersonAction( final result = await showAssignPersonAction(
context, context,
@ -276,6 +271,8 @@ class SearchExample extends StatelessWidget {
routeToPage(context, PeoplePage(person: result)); routeToPage(context, PeoplePage(person: result));
} }
}, },
child: Padding(
padding: const EdgeInsets.only(top: 10, bottom: 16),
child: Text( child: Text(
"Add name", "Add name",
maxLines: 1, maxLines: 1,
@ -283,14 +280,18 @@ class SearchExample extends StatelessWidget {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: getEnteTextTheme(context).mini, style: getEnteTextTheme(context).mini,
), ),
),
) )
: Text( : Padding(
padding: const EdgeInsets.only(top: 10, bottom: 16),
child: Text(
searchResult.name(), searchResult.name(),
maxLines: 2, maxLines: 2,
textAlign: TextAlign.center, textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: getEnteTextTheme(context).mini, style: getEnteTextTheme(context).mini,
), ),
),
], ],
), ),
), ),