-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug report] Create Date sql query not working properly #1242
Comments
AI Summary: The user reports that filtering assets by |
As you can refer this recording now when applying filter of date_added grater then Dec 2023, Note: I have printed CreateDate from AssetEntity Recorder_10122024_123526.mp4 |
Was the query not working as always regardless of the date? Or was the feature not working on this single phone and provide it's model? |
Query is not working on android regardless, |
It sounds like a device-specific problem. |
Hey Alex, by debugging more on this i was able to reproduce it only happens to picture-specific and only in android(any android device), Download this images by download all option (In three dot menu) and try performing the same, you will be able to reproduce it. This both images are from Dec 05, 2022. (If you want more such images for testing i can send it to you) |
How do you read the creation date in the grid? |
To read the creation date in the grid, I use AssetEntity.createDateTime. In the ImageItemWidget, I modified the _buildImageWidget() method as follows: Note: I use an extension method getReadableDateFormat() to format the DateTime as needed. Widget _buildImageWidget(
BuildContext context,
AssetEntity entity,
ThumbnailOption option,
) {
return Stack(
children: <Widget>[
Positioned.fill(
child: AssetEntityImage(
entity,
isOriginal: false,
thumbnailSize: option.size,
thumbnailFormat: option.format,
fit: BoxFit.cover,
),
),
PositionedDirectional(
bottom: 4,
start: 0,
end: 0,
child: Row(
children: [
if (entity.isFavorite)
Container(
padding: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
shape: BoxShape.circle,
),
child: const Icon(
Icons.favorite,
color: Colors.redAccent,
size: 16,
),
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
if (entity.isLivePhoto)
Container(
margin: const EdgeInsetsDirectional.only(end: 4),
padding: const EdgeInsets.symmetric(
horizontal: 3,
vertical: 1,
),
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(
Radius.circular(4),
),
color: Theme.of(context).cardColor,
),
child: const Text(
'LIVE',
style: TextStyle(
color: Colors.black,
fontSize: 10,
fontWeight: FontWeight.bold,
height: 1,
),
),
),
Icon(
() {
switch (entity.type) {
case AssetType.other:
return Icons.abc;
case AssetType.image:
return Icons.image;
case AssetType.video:
return Icons.video_file;
case AssetType.audio:
return Icons.audiotrack;
}
}(),
color: Colors.white,
size: 16,
),
],
),
),
],
),
),
Center(
child: Text(
entity.createDateTime.getReadableDateFormat(),
style: const TextStyle(color: Colors.white),
),
),
],
);
} |
Hi @AlexV525 , I hope you're doing well! I just wanted to check in—were you able to reproduce the issue? Please feel free to reach out if you need anything else. |
No, I'm not actively investigating this. We process issues mainly in our spare time so it may take a while. |
Version
3.6.2
Platforms
Android
Device Model
All
flutter info
How to reproduce?
When filtering images through CustomColumns.base.createDate on IOS it seems to work as expected,
while in Android i am getting image even from 2-3 years old createDate
Steps i have tried:
There is some issue with create date filtering on Android side query i guess.
Logs
No response
Example code (optional)
Contact
No response
The text was updated successfully, but these errors were encountered: