This commit is contained in:
Hamza-Ayed
2024-05-29 16:12:26 +03:00
parent 4af52f4392
commit 4bff08f2e7
2 changed files with 5 additions and 3 deletions

View File

@@ -4,6 +4,8 @@ class MyTranslation extends Translations {
@override @override
Map<String, Map<String, String>> get keys => { Map<String, Map<String, String>> get keys => {
"ar": { "ar": {
"Please wait": "الرجاء الانتظار",
"minutes before trying again.": " دقيقة قبل المحاولة مرة أخرى.",
"Total rides on month": "إجمالي الرحلات في الشهر", "Total rides on month": "إجمالي الرحلات في الشهر",
"Counts of rides on days": "عدد الرحلات حسب الأيام", "Counts of rides on days": "عدد الرحلات حسب الأيام",
"You should restart app to change language": "You should restart app to change language":

View File

@@ -132,7 +132,7 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
box.read(BoxName.lastTimeStaticThrottle); box.read(BoxName.lastTimeStaticThrottle);
if (lastRequestTime == null || if (lastRequestTime == null ||
now.difference(lastRequestTime).inMinutes >= 15) { now.difference(lastRequestTime).inMinutes >= 2) {
// Update the last request time to now // Update the last request time to now
lastRequestTime = now; lastRequestTime = now;
box.write(BoxName.lastTimeStaticThrottle, lastRequestTime); box.write(BoxName.lastTimeStaticThrottle, lastRequestTime);
@@ -141,9 +141,9 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
} else { } else {
// Optionally show a message or handle the throttling case // Optionally show a message or handle the throttling case
final minutesLeft = final minutesLeft =
15 - now.difference(lastRequestTime).inMinutes; 2 - now.difference(lastRequestTime).inMinutes;
Get.snackbar( Get.snackbar(
'Please wait $minutesLeft minutes before trying again.', '${'Please wait'.tr} $minutesLeft ${"minutes before trying again.".tr}',
''); '');
} }
}, },