add android bundle release
All checks were successful
Release / meta (push) Successful in 10s
Release / linux-build (push) Successful in 6m32s
Release / web-build (push) Successful in 5m50s
Release / android-build (push) Successful in 20m43s
Release / release-master (push) Successful in 26s
Release / release-dev (push) Successful in 28s
All checks were successful
Release / meta (push) Successful in 10s
Release / linux-build (push) Successful in 6m32s
Release / web-build (push) Successful in 5m50s
Release / android-build (push) Successful in 20m43s
Release / release-master (push) Successful in 26s
Release / release-dev (push) Successful in 28s
This commit is contained in:
@@ -151,7 +151,8 @@ class DataService extends ChangeNotifier {
|
||||
try {
|
||||
final json = await api.get('/stats/homepage');
|
||||
_homepageStats = HomepageStats.fromJson(json);
|
||||
_trips = _homepageStats?.trips ?? [];
|
||||
_trips = [...(_homepageStats?.trips ?? const [])]
|
||||
..sort(TripSummary.compareByDateDesc);
|
||||
} catch (e) {
|
||||
debugPrint('Failed to fetch homepage stats: $e');
|
||||
_homepageStats = null;
|
||||
|
||||
@@ -6,7 +6,7 @@ extension DataServiceTrips on DataService {
|
||||
try {
|
||||
final json = await api.get('/trips/info');
|
||||
final tripDetails = _parseTripInfoList(json);
|
||||
_tripDetails = [...tripDetails]..sort((a, b) => b.id.compareTo(a.id));
|
||||
_tripDetails = [...tripDetails]..sort(TripDetail.compareByDateDesc);
|
||||
_tripList = tripDetails
|
||||
.map(
|
||||
(detail) => TripSummary(
|
||||
@@ -15,10 +15,12 @@ extension DataServiceTrips on DataService {
|
||||
tripMileage: detail.mileage,
|
||||
legCount: detail.legCount,
|
||||
locoStats: detail.locoStats,
|
||||
startDate: detail.startDate,
|
||||
endDate: detail.endDate,
|
||||
),
|
||||
)
|
||||
.toList()
|
||||
..sort((a, b) => b.tripId.compareTo(a.tripId));
|
||||
..sort(TripSummary.compareByDateDesc);
|
||||
} catch (e) {
|
||||
debugPrint('Failed to fetch trip_map: $e');
|
||||
_tripDetails = [];
|
||||
@@ -49,7 +51,7 @@ extension DataServiceTrips on DataService {
|
||||
.map((e) => TripSummary.fromJson(e))
|
||||
.toList();
|
||||
|
||||
_tripList = [...tripMap]..sort((a, b) => b.tripId.compareTo(a.tripId));
|
||||
_tripList = [...tripMap]..sort(TripSummary.compareByDateDesc);
|
||||
} else {
|
||||
debugPrint('Unexpected trip list response: $json');
|
||||
_tripList = [];
|
||||
@@ -83,7 +85,7 @@ extension DataServiceTrips on DataService {
|
||||
.map((e) => TripSummary.fromJson(e))
|
||||
.toList();
|
||||
|
||||
_tripList = [...tripMap]..sort((a, b) => b.tripId.compareTo(a.tripId));
|
||||
_tripList = [...tripMap]..sort(TripSummary.compareByDateDesc);
|
||||
} else {
|
||||
debugPrint('Unexpected trip list response: $json');
|
||||
_tripList = [];
|
||||
@@ -105,7 +107,7 @@ extension DataServiceTrips on DataService {
|
||||
} else {
|
||||
_tripList = [trip, ..._tripList];
|
||||
}
|
||||
_tripList.sort((a, b) => b.tripId.compareTo(a.tripId));
|
||||
_tripList.sort(TripSummary.compareByDateDesc);
|
||||
_notifyAsync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user