Update: 2026-06-13 00:57:17
This commit is contained in:
@@ -265,6 +265,17 @@ class HomeCaptainController extends GetxController {
|
||||
);
|
||||
}
|
||||
|
||||
double get minPointsThreshold {
|
||||
String country = box.read(BoxName.countryCode) ?? 'Syria';
|
||||
if (country == 'Jordan') {
|
||||
return -3.0;
|
||||
} else if (country == 'Egypt') {
|
||||
return -200.0;
|
||||
} else {
|
||||
return -200.0; // Default (Syria / other)
|
||||
}
|
||||
}
|
||||
|
||||
void onButtonSelected() {
|
||||
if (!Get.isRegistered<CaptainWalletController>()) {
|
||||
Get.put(CaptainWalletController());
|
||||
@@ -278,7 +289,7 @@ class HomeCaptainController extends GetxController {
|
||||
try {
|
||||
_checkFatigueBeforeOnline(); // Throws exception if tired
|
||||
|
||||
if (double.parse(totalPoints) > -200) {
|
||||
if (double.parse(totalPoints) > minPointsThreshold) {
|
||||
locationController.startLocationUpdates();
|
||||
HapticFeedback.heavyImpact();
|
||||
activeStartTime = DateTime.now();
|
||||
@@ -455,8 +466,8 @@ class HomeCaptainController extends GetxController {
|
||||
await sql.getCustomQuery(customQuery);
|
||||
countRefuse = results[0]['count'].toString();
|
||||
update();
|
||||
if (double.parse(totalPoints) <= -200) {
|
||||
// if (int.parse(countRefuse) > 3 || double.parse(totalPoints) <= -200) {
|
||||
if (double.parse(totalPoints) <= minPointsThreshold) {
|
||||
// if (int.parse(countRefuse) > 3 || double.parse(totalPoints) <= minPointsThreshold) {
|
||||
locationController.stopLocationUpdates();
|
||||
activeStartTime = null;
|
||||
activeTimer?.cancel();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/de.dart
Normal file
2662
siro_driver/lib/controller/local/de.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/el.dart
Normal file
2662
siro_driver/lib/controller/local/el.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/en.dart
Normal file
2662
siro_driver/lib/controller/local/en.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/es.dart
Normal file
2662
siro_driver/lib/controller/local/es.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/fa.dart
Normal file
2662
siro_driver/lib/controller/local/fa.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/fr.dart
Normal file
2662
siro_driver/lib/controller/local/fr.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/hi.dart
Normal file
2662
siro_driver/lib/controller/local/hi.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/it.dart
Normal file
2662
siro_driver/lib/controller/local/it.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/ru.dart
Normal file
2662
siro_driver/lib/controller/local/ru.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/tr.dart
Normal file
2662
siro_driver/lib/controller/local/tr.dart
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,18 @@ import 'package:get/get.dart';
|
||||
import 'ar_sy.dart';
|
||||
import 'ar_eg.dart';
|
||||
import 'ar_jo.dart';
|
||||
import 'en.dart';
|
||||
import 'de.dart';
|
||||
import 'el.dart';
|
||||
import 'es.dart';
|
||||
import 'fa.dart';
|
||||
import 'fr.dart';
|
||||
import 'hi.dart';
|
||||
import 'it.dart';
|
||||
import 'ru.dart';
|
||||
import 'tr.dart';
|
||||
import 'ur.dart';
|
||||
import 'zh.dart';
|
||||
|
||||
class MyTranslation extends Translations {
|
||||
@override
|
||||
@@ -10,5 +22,17 @@ class MyTranslation extends Translations {
|
||||
"ar-SY": ar_sy,
|
||||
"ar-EG": ar_eg,
|
||||
"ar-JO": ar_jo,
|
||||
"en": en,
|
||||
"de": de,
|
||||
"el": el,
|
||||
"es": es,
|
||||
"fa": fa,
|
||||
"fr": fr,
|
||||
"hi": hi,
|
||||
"it": it,
|
||||
"ru": ru,
|
||||
"tr": tr,
|
||||
"ur": ur,
|
||||
"zh": zh,
|
||||
};
|
||||
}
|
||||
|
||||
2662
siro_driver/lib/controller/local/ur.dart
Normal file
2662
siro_driver/lib/controller/local/ur.dart
Normal file
File diff suppressed because it is too large
Load Diff
2662
siro_driver/lib/controller/local/zh.dart
Normal file
2662
siro_driver/lib/controller/local/zh.dart
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user