-
Notifications
You must be signed in to change notification settings - Fork 314
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
[How to use] Sort result like Camera Roll in iOS #1162
Comments
This issue is side effct when I want to upgrade photo_manager for 2.x to 3.2. Because this behavior change, I need to add orderby for CustomFilter.sql
in photo_manager 2.8. I just use |
I face the same issue. The result is still unexpected after adding the OrderByItem(CustomColumns.base.createDate, false). Process ran to getAssetListPaged would get the results with wrong order.
It seems that getAssetOptions will return different statement. |
Use the none option. (The To add a log for next patch: diff --git a/example/lib/page/custom_filter/path_list.dart b/example/lib/page/custom_filter/path_list.dart
index fc08122..8fd621e 100644
--- a/example/lib/page/custom_filter/path_list.dart
+++ b/example/lib/page/custom_filter/path_list.dart
@@ -59,6 +59,9 @@ class PathList extends StatelessWidget {
position: ToastPosition.bottom,
);
});
+ for (final asset in path.filterOption.toMap().entries) {
+ print('${asset.key}: ${asset.value}');
+ }
Navigator.push(
context,
MaterialPageRoute(
I get next log: {where: , orderBy: [], needTitle: false, containsPathModified: false} I use the example of the library: Kapture.2024-07-30.at.10.52.13.mp4 |
@CaiJingLong thanks your reply. Is there anyway support this case? I can get this kind result in photo_manager 3.1, but not in 3.2. Thanks. |
@CaiJingLong is it possiable ? |
I've tried Photo Manager 3.4.0, but I've noticed that photos and videos received through AirDrop appear in a different order compared to the Camera Roll. |
@CaiJingLong
The result is what I want. But, it have assert here
Is it possiable change code to
|
The assertion has been removed in v3.5.0. In my opinion, the filter options group applies more conditions to the query. Simply set breakpoints in the native debugging can easily find out the core condition to produce the natural album order. |
Having some time playing iOS Gallery. Here is the conclusion:
In iOS 18, these two entries are combined and the sort options are provided. So choose the fitting order according to your use case. |
Platforms
iOS
Description
Is there any way that can get sort result like iOS camera roll (Recent)?
My code
I tried createDate and modifiedDate. but result is not same with Camera roll.
Can I get sort result like Camera Roll ? it is no issue before photo_manager 3.1.1
The text was updated successfully, but these errors were encountered: