5/29/4
This commit is contained in:
@@ -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":
|
||||||
|
|||||||
@@ -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}',
|
||||||
'');
|
'');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user