TF-483 Hover in email, checkbox is available to select email in ThreadView
This commit is contained in:
@@ -27,6 +27,7 @@ class EmailTileBuilder {
|
|||||||
OnMoreActionClick? _onMoreActionClick;
|
OnMoreActionClick? _onMoreActionClick;
|
||||||
|
|
||||||
bool isHoverItem = false;
|
bool isHoverItem = false;
|
||||||
|
bool isHoverIcon = false;
|
||||||
|
|
||||||
EmailTileBuilder(
|
EmailTileBuilder(
|
||||||
this._context,
|
this._context,
|
||||||
@@ -195,16 +196,18 @@ class EmailTileBuilder {
|
|||||||
return StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
|
return StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () => _emailActionClick?.call(EmailActionType.preview, _presentationEmail),
|
onTap: () => _emailActionClick?.call(EmailActionType.preview, _presentationEmail),
|
||||||
onLongPress: () => _emailActionClick?.call(EmailActionType.selection, _presentationEmail),
|
|
||||||
onHover: (value) => setState(() => isHoverItem = value),
|
onHover: (value) => setState(() => isHoverItem = value),
|
||||||
child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
GestureDetector(
|
InkWell(
|
||||||
onTap: () => _emailActionClick?.call(
|
onTap: () {
|
||||||
_selectModeAll == SelectMode.ACTIVE ? EmailActionType.selection : EmailActionType.preview,
|
if (isHoverIcon) {
|
||||||
_presentationEmail),
|
_emailActionClick?.call(EmailActionType.selection, _presentationEmail);
|
||||||
child: Padding(
|
}
|
||||||
padding: const EdgeInsets.only(top: 8, right: 12),
|
},
|
||||||
child: _buildAvatarIcon())),
|
onHover: (value) => setState(() => isHoverIcon = value),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 8, right: 12),
|
||||||
|
child: _buildAvatarIcon())),
|
||||||
Expanded(child: Column(children: [
|
Expanded(child: Column(children: [
|
||||||
Transform(
|
Transform(
|
||||||
transform: Matrix4.translationValues(0.0, isHoverItem ? -10.0 : 0.0, 0.0),
|
transform: Matrix4.translationValues(0.0, isHoverItem ? -10.0 : 0.0, 0.0),
|
||||||
@@ -304,7 +307,6 @@ class EmailTileBuilder {
|
|||||||
return StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
|
return StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () => _emailActionClick?.call(EmailActionType.preview, _presentationEmail),
|
onTap: () => _emailActionClick?.call(EmailActionType.preview, _presentationEmail),
|
||||||
onLongPress: () => _emailActionClick?.call(EmailActionType.selection, _presentationEmail),
|
|
||||||
onHover: (value) => setState(() => isHoverItem = value),
|
onHover: (value) => setState(() => isHoverItem = value),
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Row(children: [
|
Row(children: [
|
||||||
@@ -324,21 +326,19 @@ class EmailTileBuilder {
|
|||||||
onTap: () => _emailActionClick?.call(
|
onTap: () => _emailActionClick?.call(
|
||||||
_presentationEmail.hasStarred ? EmailActionType.unMarkAsStarred : EmailActionType.markAsStarred,
|
_presentationEmail.hasStarred ? EmailActionType.unMarkAsStarred : EmailActionType.markAsStarred,
|
||||||
_presentationEmail)),
|
_presentationEmail)),
|
||||||
if (_selectModeAll == SelectMode.INACTIVE) const SizedBox(width: 8),
|
InkWell(
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (_selectModeAll == SelectMode.ACTIVE) {
|
if (isHoverIcon) {
|
||||||
_emailActionClick?.call(EmailActionType.selection, _presentationEmail);
|
_emailActionClick?.call(EmailActionType.selection, _presentationEmail);
|
||||||
} else {
|
|
||||||
_emailActionClick?.call(EmailActionType.preview, _presentationEmail);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onHover: (value) => setState(() => isHoverIcon = value),
|
||||||
child: _buildAvatarIcon(
|
child: _buildAvatarIcon(
|
||||||
iconSize: 32,
|
iconSize: 32,
|
||||||
textStyle: const TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white),
|
textStyle: const TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white),
|
||||||
paddingIconSelect: const EdgeInsets.all(5)),
|
paddingIconSelect: const EdgeInsets.all(5)),
|
||||||
),
|
),
|
||||||
if (_selectModeAll == SelectMode.INACTIVE) const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 160,
|
width: 160,
|
||||||
child: _isSearchEnabled
|
child: _isSearchEnabled
|
||||||
@@ -361,7 +361,7 @@ class EmailTileBuilder {
|
|||||||
]),
|
]),
|
||||||
if (_selectModeAll == SelectMode.INACTIVE)
|
if (_selectModeAll == SelectMode.INACTIVE)
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.only(top: 7.5, bottom: 7.5, left: 70),
|
padding: EdgeInsets.only(top: 7.5, bottom: 7.5, left: 80),
|
||||||
child: Divider(color: AppColor.lineItemListColor, height: 1, thickness: 0.2)),
|
child: Divider(color: AppColor.lineItemListColor, height: 1, thickness: 0.2)),
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
@@ -504,14 +504,17 @@ class EmailTileBuilder {
|
|||||||
EdgeInsets? paddingIconSelect,
|
EdgeInsets? paddingIconSelect,
|
||||||
TextStyle? textStyle
|
TextStyle? textStyle
|
||||||
}) {
|
}) {
|
||||||
if (_selectModeAll == SelectMode.ACTIVE) {
|
if (isHoverIcon || _presentationEmail.selectMode == SelectMode.ACTIVE
|
||||||
return Padding(
|
|| (_responsiveUtils.isMobile(_context) && _selectModeAll == SelectMode.ACTIVE)) {
|
||||||
padding: const EdgeInsets.all(12),
|
return Padding(
|
||||||
child: SvgPicture.asset(
|
padding: _responsiveUtils.isDesktop(_context)
|
||||||
_presentationEmail.selectMode == SelectMode.ACTIVE
|
? const EdgeInsets.symmetric(horizontal: 4)
|
||||||
? _imagePaths.icSelected
|
: const EdgeInsets.all(12),
|
||||||
: _imagePaths.icUnSelected,
|
child: SvgPicture.asset(
|
||||||
fit: BoxFit.fill));
|
_presentationEmail.selectMode == SelectMode.ACTIVE
|
||||||
|
? _imagePaths.icSelected
|
||||||
|
: _imagePaths.icUnSelected,
|
||||||
|
fit: BoxFit.fill));
|
||||||
} else {
|
} else {
|
||||||
return Container(
|
return Container(
|
||||||
width: iconSize ?? 48,
|
width: iconSize ?? 48,
|
||||||
|
|||||||
Reference in New Issue
Block a user