7/7/1
This commit is contained in:
@@ -894,8 +894,9 @@ class MapPassengerController extends GetxController {
|
||||
try {
|
||||
Uri uri = Uri.parse(link);
|
||||
|
||||
if (uri.host == 'maps.google.com') {
|
||||
if (uri.host == 'maps.google.com' || uri.host == 'www.google.com') {
|
||||
String? query = uri.queryParameters['q'];
|
||||
query ??= uri.queryParameters['ll'];
|
||||
|
||||
if (query != null) {
|
||||
List<String> coordinates = query.split(',');
|
||||
@@ -910,6 +911,9 @@ class MapPassengerController extends GetxController {
|
||||
};
|
||||
}
|
||||
}
|
||||
} else if (uri.host == 'goo.gl') {
|
||||
// Shortened URLs might need to be expanded first
|
||||
// Implement additional logic to expand the URL here if necessary
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error parsing WhatsApp location link: $e');
|
||||
@@ -1164,7 +1168,7 @@ class MapPassengerController extends GetxController {
|
||||
}
|
||||
|
||||
void delayAndFetchRideStatus(String rideId) {
|
||||
Timer(const Duration(milliseconds: 200), () async {
|
||||
Timer(const Duration(seconds: 1), () async {
|
||||
if (shouldFetch) {
|
||||
if (remainingTimeToPassengerFromDriverAfterApplied > 0) {
|
||||
var res = await getRideStatus(rideId);
|
||||
@@ -1197,7 +1201,7 @@ class MapPassengerController extends GetxController {
|
||||
}
|
||||
|
||||
void delayAndFetchRideStatusForAllDriverAvailable(String rideId) {
|
||||
Timer(const Duration(milliseconds: 200), () async {
|
||||
Timer(const Duration(milliseconds: 1000), () async {
|
||||
if (shouldFetch) {
|
||||
var res = await getRideStatus(rideId);
|
||||
// var decod = jsonDecode(res);
|
||||
@@ -1532,8 +1536,8 @@ class MapPassengerController extends GetxController {
|
||||
await Future.delayed(const Duration(seconds: 4));
|
||||
if (rideTimerBegin == true || statusRide == 'Apply') {
|
||||
await getDriverCarsLocationToPassengerAfterApplied();
|
||||
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
|
||||
}
|
||||
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2107,6 +2111,7 @@ class MapPassengerController extends GetxController {
|
||||
|
||||
reloadMarkers() async {
|
||||
if (statusRide == 'wait') {
|
||||
clearMarkersExceptStartEnd();
|
||||
await getCarsLocationByPassengerAndReloadMarker();
|
||||
await getNearestDriverByPassengerLocation();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user