TF-602 Persist size item email when selection on mobile browser
This commit is contained in:
@@ -52,7 +52,7 @@ class EmailTileBuilder {
|
|||||||
|
|
||||||
void _onHoverIconChanged(bool isHover, StateSetter setState) {
|
void _onHoverIconChanged(bool isHover, StateSetter setState) {
|
||||||
if (_debounceTimeIcon?.isActive ?? false) _debounceTimeIcon?.cancel();
|
if (_debounceTimeIcon?.isActive ?? false) _debounceTimeIcon?.cancel();
|
||||||
_debounceTimeIcon = Timer(const Duration(milliseconds: 300), () {
|
_debounceTimeIcon = Timer(const Duration(milliseconds: 100), () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isHoverIcon = isHover;
|
isHoverIcon = isHover;
|
||||||
});
|
});
|
||||||
@@ -61,7 +61,7 @@ class EmailTileBuilder {
|
|||||||
|
|
||||||
void _onHoverItemChanged(bool isHover, StateSetter setState) {
|
void _onHoverItemChanged(bool isHover, StateSetter setState) {
|
||||||
if (_debounceTimeItem?.isActive ?? false) _debounceTimeItem?.cancel();
|
if (_debounceTimeItem?.isActive ?? false) _debounceTimeItem?.cancel();
|
||||||
_debounceTimeItem = Timer(const Duration(milliseconds: 300), () {
|
_debounceTimeItem = Timer(const Duration(milliseconds: 200), () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isHoverItem = isHover;
|
isHoverItem = isHover;
|
||||||
});
|
});
|
||||||
@@ -94,15 +94,6 @@ class EmailTileBuilder {
|
|||||||
: null,
|
: null,
|
||||||
child: tile,
|
child: tile,
|
||||||
);
|
);
|
||||||
} else if (_responsiveUtils.isTabletLarge(_context) || _responsiveUtils.isTablet(_context)) {
|
|
||||||
return Container(
|
|
||||||
margin: const EdgeInsets.only(top: 3, left: 16, right: 16),
|
|
||||||
padding: const EdgeInsets.only(bottom: 8, right: 8, top: 8),
|
|
||||||
decoration: _selectModeAll == SelectMode.ACTIVE && _presentationEmail.selectMode == SelectMode.ACTIVE
|
|
||||||
? BoxDecoration(borderRadius: BorderRadius.circular(14), color: AppColor.colorItemEmailSelectedDesktop)
|
|
||||||
: BoxDecoration(borderRadius: BorderRadius.circular(0), color: Colors.white),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: tile);
|
|
||||||
} else {
|
} else {
|
||||||
return Container(
|
return Container(
|
||||||
margin: const EdgeInsets.only(top: 3, left: 16, right: 16),
|
margin: const EdgeInsets.only(top: 3, left: 16, right: 16),
|
||||||
@@ -116,18 +107,24 @@ class EmailTileBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildListTile() {
|
Widget _buildListTile() {
|
||||||
return Column(children: [
|
return Stack(alignment: Alignment.bottomCenter,
|
||||||
ListTile(
|
children: [
|
||||||
contentPadding: EdgeInsets.zero,
|
InkWell(
|
||||||
onTap: () => _emailActionClick?.call(EmailActionType.preview, _presentationEmail),
|
onTap: () => _emailActionClick?.call(EmailActionType.preview, _presentationEmail),
|
||||||
onLongPress: () => _emailActionClick?.call(EmailActionType.selection, _presentationEmail),
|
onLongPress: () => _emailActionClick?.call(EmailActionType.selection, _presentationEmail),
|
||||||
leading: GestureDetector(
|
child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
|
InkWell(
|
||||||
onTap: () => _emailActionClick?.call(
|
onTap: () => _emailActionClick?.call(
|
||||||
_selectModeAll == SelectMode.ACTIVE ? EmailActionType.selection : EmailActionType.preview,
|
_selectModeAll == SelectMode.ACTIVE ? EmailActionType.selection : EmailActionType.preview,
|
||||||
_presentationEmail),
|
_presentationEmail),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 8, right: 12),
|
||||||
child: _buildAvatarIcon(),
|
child: _buildAvatarIcon(),
|
||||||
),
|
),
|
||||||
title: Row(children: [
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(children: [
|
||||||
|
Row(children: [
|
||||||
if (!_presentationEmail.hasRead)
|
if (!_presentationEmail.hasRead)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 5),
|
padding: const EdgeInsets.only(right: 5),
|
||||||
@@ -166,15 +163,8 @@ class EmailTileBuilder {
|
|||||||
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail))),
|
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail))),
|
||||||
SvgPicture.asset(_imagePaths.icChevron, width: 16, height: 16, fit: BoxFit.fill)
|
SvgPicture.asset(_imagePaths.icChevron, width: 16, height: 16, fit: BoxFit.fill)
|
||||||
]),
|
]),
|
||||||
subtitle: Transform(
|
const SizedBox(height: 8),
|
||||||
transform: Matrix4.translationValues(0.0, 8.0, 0.0),
|
Row(
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: _searchStatus == SearchStatus.ACTIVE && _searchQuery != null && _searchQuery!.value.isNotEmpty
|
Expanded(child: _searchStatus == SearchStatus.ACTIVE && _searchQuery != null && _searchQuery!.value.isNotEmpty
|
||||||
@@ -213,10 +203,9 @@ class EmailTileBuilder {
|
|||||||
if (_presentationEmail.hasStarred)
|
if (_presentationEmail.hasStarred)
|
||||||
SvgPicture.asset(_imagePaths.icStar, width: 15, height: 15, fit: BoxFit.fill),
|
SvgPicture.asset(_imagePaths.icStar, width: 15, height: 15, fit: BoxFit.fill),
|
||||||
],
|
],
|
||||||
)),
|
),
|
||||||
Padding(
|
const SizedBox(height: 8),
|
||||||
padding: const EdgeInsets.only(top: 8),
|
Row(children: [
|
||||||
child: Row(children: [
|
|
||||||
Expanded(child: _searchStatus == SearchStatus.ACTIVE && _searchQuery != null && _searchQuery!.value.isNotEmpty
|
Expanded(child: _searchStatus == SearchStatus.ACTIVE && _searchQuery != null && _searchQuery!.value.isNotEmpty
|
||||||
? RichTextBuilder(
|
? RichTextBuilder(
|
||||||
_presentationEmail.getPartialContent(),
|
_presentationEmail.getPartialContent(),
|
||||||
@@ -228,16 +217,20 @@ class EmailTileBuilder {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail))
|
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail))
|
||||||
),
|
),
|
||||||
])),
|
]),
|
||||||
if (_selectModeAll == SelectMode.INACTIVE)
|
]),
|
||||||
const Padding(
|
|
||||||
padding: EdgeInsets.only(top: 12),
|
|
||||||
child: Divider(color: AppColor.lineItemListColor, height: 1, thickness: 0.2)),
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
])
|
||||||
),
|
),
|
||||||
),
|
if (_selectModeAll == SelectMode.INACTIVE)
|
||||||
]);
|
Transform(
|
||||||
|
transform: Matrix4.translationValues(0.0, 10.0, 0.0),
|
||||||
|
child: const Divider(
|
||||||
|
color: AppColor.lineItemListColor,
|
||||||
|
height: 1,
|
||||||
|
thickness: 0.2)),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildListTileTablet() {
|
Widget _buildListTileTablet() {
|
||||||
@@ -299,9 +292,8 @@ class EmailTileBuilder {
|
|||||||
else
|
else
|
||||||
_buildDateTimeForMobileTabletScreen()
|
_buildDateTimeForMobileTabletScreen()
|
||||||
]),
|
]),
|
||||||
Padding(
|
const SizedBox(height: 8),
|
||||||
padding: const EdgeInsets.only(top: 8),
|
Row(
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: _searchStatus == SearchStatus.ACTIVE && _searchQuery != null && _searchQuery!.value.isNotEmpty
|
Expanded(child: _searchStatus == SearchStatus.ACTIVE && _searchQuery != null && _searchQuery!.value.isNotEmpty
|
||||||
@@ -340,10 +332,9 @@ class EmailTileBuilder {
|
|||||||
if (_presentationEmail.hasStarred)
|
if (_presentationEmail.hasStarred)
|
||||||
SvgPicture.asset(_imagePaths.icStar, width: 15, height: 15, fit: BoxFit.fill)
|
SvgPicture.asset(_imagePaths.icStar, width: 15, height: 15, fit: BoxFit.fill)
|
||||||
],
|
],
|
||||||
)),
|
),
|
||||||
Padding(
|
const SizedBox(height: 8),
|
||||||
padding: const EdgeInsets.only(top: 8),
|
Row(children: [
|
||||||
child: Row(children: [
|
|
||||||
Expanded(child: _searchStatus ==
|
Expanded(child: _searchStatus ==
|
||||||
SearchStatus.ACTIVE && _searchQuery != null &&
|
SearchStatus.ACTIVE && _searchQuery != null &&
|
||||||
_searchQuery!.value.isNotEmpty
|
_searchQuery!.value.isNotEmpty
|
||||||
@@ -357,7 +348,7 @@ class EmailTileBuilder {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail))
|
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail))
|
||||||
),
|
),
|
||||||
])),
|
]),
|
||||||
]),
|
]),
|
||||||
if (_selectModeAll == SelectMode.INACTIVE)
|
if (_selectModeAll == SelectMode.INACTIVE)
|
||||||
Transform(
|
Transform(
|
||||||
|
|||||||
Reference in New Issue
Block a user