fix(ui): use createdAt to sort media (the default value is updatedAt)
This commit is contained in:
@@ -145,15 +145,16 @@ class _MediaListViewState extends State<MediaListView> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _getMedia() async {
|
Future<void> _getMedia() async {
|
||||||
final assetList = await PhotoManager.getAssetPathList().then((value) {
|
final assetList = (await PhotoManager.getAssetPathList(
|
||||||
if (value.isNotEmpty) {
|
filterOption: FilterOptionGroup(orders: [
|
||||||
return value.singleWhere((element) => element.isAll);
|
const OrderOption(
|
||||||
}
|
// ignore: avoid_redundant_argument_values
|
||||||
});
|
type: OrderOptionType.createDate,
|
||||||
|
),
|
||||||
if (assetList == null) {
|
]),
|
||||||
return;
|
onlyAll: true,
|
||||||
}
|
))
|
||||||
|
.first;
|
||||||
|
|
||||||
final media = await assetList.getAssetListPaged(_currentPage, 50);
|
final media = await assetList.getAssetListPaged(_currentPage, 50);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user