diff --git a/mobile/ios/Runner/Runner.entitlements b/mobile/ios/Runner/Runner.entitlements
new file mode 100644
index 0000000000..0c67376eba
--- /dev/null
+++ b/mobile/ios/Runner/Runner.entitlements
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/mobile/lib/modules/backup/background_service/background.service.dart b/mobile/lib/modules/backup/background_service/background.service.dart
index 59ad4dc604..6f8cad790e 100644
--- a/mobile/lib/modules/backup/background_service/background.service.dart
+++ b/mobile/lib/modules/backup/background_service/background.service.dart
@@ -301,12 +301,11 @@ class BackgroundService {
// indefinitely and can run later
// Android is fine to wait here until the lock releases
final waitForLock = Platform.isIOS
- ? acquireLock()
- .timeout(
- const Duration(seconds: 5),
- onTimeout: () => false,
- )
- : acquireLock();
+ ? acquireLock().timeout(
+ const Duration(seconds: 5),
+ onTimeout: () => false,
+ )
+ : acquireLock();
final bool hasAccess = await waitForLock;
if (!hasAccess) {
@@ -381,7 +380,8 @@ class BackgroundService {
}
// Android should check for new assets added while performing backup
} while (Platform.isAndroid &&
- true == await _backgroundChannel.invokeMethod("hasContentChanged"));
+ true ==
+ await _backgroundChannel.invokeMethod("hasContentChanged"));
return true;
}
@@ -555,8 +555,8 @@ class BackgroundService {
Future getIOSBackupLastRun(IosBackgroundTask task) async {
// Seconds since last run
final double? lastRun = task == IosBackgroundTask.fetch
- ? await _foregroundChannel.invokeMethod('lastBackgroundFetchTime')
- : await _foregroundChannel.invokeMethod('lastBackgroundProcessingTime');
+ ? await _foregroundChannel.invokeMethod('lastBackgroundFetchTime')
+ : await _foregroundChannel.invokeMethod('lastBackgroundProcessingTime');
if (lastRun == null) {
return null;
}
@@ -565,15 +565,11 @@ class BackgroundService {
}
Future getIOSBackupNumberOfProcesses() async {
- return await _foregroundChannel
- .invokeMethod('numberOfBackgroundProcesses');
+ return await _foregroundChannel.invokeMethod('numberOfBackgroundProcesses');
}
}
-enum IosBackgroundTask {
- fetch,
- processing
-}
+enum IosBackgroundTask { fetch, processing }
class _Throttle {
_Throttle(this._fun, Duration interval) : _interval = interval.inMicroseconds;
diff --git a/mobile/lib/modules/backup/ui/backup_info_card.dart b/mobile/lib/modules/backup/ui/backup_info_card.dart
index aa9629cd38..bf52c79e6e 100644
--- a/mobile/lib/modules/backup/ui/backup_info_card.dart
+++ b/mobile/lib/modules/backup/ui/backup_info_card.dart
@@ -21,7 +21,7 @@ class BackupInfoCard extends StatelessWidget {
borderRadius: BorderRadius.circular(20), // if you need this
side: BorderSide(
color: isDarkMode
- ? const Color.fromARGB(255, 101, 101, 101)
+ ? const Color.fromARGB(255, 56, 56, 56)
: Colors.black12,
width: 1,
),
diff --git a/mobile/lib/modules/backup/ui/ios_debug_info_tile.dart b/mobile/lib/modules/backup/ui/ios_debug_info_tile.dart
index 5f796622a1..7dc3dbd129 100644
--- a/mobile/lib/modules/backup/ui/ios_debug_info_tile.dart
+++ b/mobile/lib/modules/backup/ui/ios_debug_info_tile.dart
@@ -11,12 +11,13 @@ class IosDebugInfoTile extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final futures = [
- ref.read(backgroundServiceProvider)
- .getIOSBackupLastRun(IosBackgroundTask.fetch),
- ref.read(backgroundServiceProvider)
- .getIOSBackupLastRun(IosBackgroundTask.processing),
- ref.read(backgroundServiceProvider)
- .getIOSBackupNumberOfProcesses(),
+ ref
+ .read(backgroundServiceProvider)
+ .getIOSBackupLastRun(IosBackgroundTask.fetch),
+ ref
+ .read(backgroundServiceProvider)
+ .getIOSBackupLastRun(IosBackgroundTask.processing),
+ ref.read(backgroundServiceProvider).getIOSBackupNumberOfProcesses(),
];
return FutureBuilder>(
future: Future.wait(futures),
@@ -41,9 +42,8 @@ class IosDebugInfoTile extends HookConsumerWidget {
} else if (processing != null && fetch == null) {
subtitle = 'Processing ran ${df.format(processing)}';
} else {
- final fetchOrProcessing = fetch!.isAfter(processing!)
- ? fetch
- : processing;
+ final fetchOrProcessing =
+ fetch!.isAfter(processing!) ? fetch : processing;
subtitle = 'Last sync ${df.format(fetchOrProcessing)}';
}
}
@@ -52,8 +52,20 @@ class IosDebugInfoTile extends HookConsumerWidget {
duration: const Duration(milliseconds: 200),
child: ListTile(
key: ValueKey(title),
- title: Text(title ?? ''),
- subtitle: Text(subtitle ?? ''),
+ title: Text(
+ title ?? '',
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 14,
+ color: Theme.of(context).primaryColor,
+ ),
+ ),
+ subtitle: Text(
+ subtitle ?? '',
+ style: const TextStyle(
+ fontSize: 14,
+ ),
+ ),
leading: Icon(
Icons.bug_report,
color: Theme.of(context).primaryColor,
@@ -64,4 +76,3 @@ class IosDebugInfoTile extends HookConsumerWidget {
);
}
}
-
diff --git a/mobile/lib/modules/backup/views/backup_controller_page.dart b/mobile/lib/modules/backup/views/backup_controller_page.dart
index 6a950eb476..929fb87142 100644
--- a/mobile/lib/modules/backup/views/backup_controller_page.dart
+++ b/mobile/lib/modules/backup/views/backup_controller_page.dart
@@ -263,14 +263,14 @@ class BackupControllerPage extends HookConsumerWidget {
if (!isBackgroundEnabled)
Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
- child:
- const Text("backup_controller_page_background_description")
- .tr(),
+ child: const Text(
+ "backup_controller_page_background_description",
+ ).tr(),
),
if (isBackgroundEnabled && Platform.isAndroid)
- SwitchListTile(
- title:
- const Text("backup_controller_page_background_wifi").tr(),
+ SwitchListTile.adaptive(
+ title: const Text("backup_controller_page_background_wifi")
+ .tr(),
secondary: Icon(
Icons.wifi,
color: isWifiRequired ? activeColor : null,
@@ -289,9 +289,10 @@ class BackupControllerPage extends HookConsumerWidget {
: null,
),
if (isBackgroundEnabled)
- SwitchListTile(
- title: const Text("backup_controller_page_background_charging")
- .tr(),
+ SwitchListTile.adaptive(
+ title:
+ const Text("backup_controller_page_background_charging")
+ .tr(),
secondary: Icon(
Icons.charging_station,
color: isChargingRequired ? activeColor : null,
@@ -319,7 +320,9 @@ class BackupControllerPage extends HookConsumerWidget {
style: TextStyle(
fontWeight: FontWeight.bold,
),
- ).tr(args: [formatBackupDelaySliderValue(triggerDelay.value)]),
+ ).tr(
+ args: [formatBackupDelaySliderValue(triggerDelay.value)],
+ ),
subtitle: Slider(
value: triggerDelay.value,
onChanged: hasExclusiveAccess
@@ -339,18 +342,21 @@ class BackupControllerPage extends HookConsumerWidget {
),
),
ElevatedButton(
- onPressed: () =>
- ref.read(backupProvider.notifier).configureBackgroundBackup(
- enabled: !isBackgroundEnabled,
- onError: showErrorToUser,
- onBatteryInfo: showBatteryOptimizationInfoToUser,
- ),
+ onPressed: () => ref
+ .read(backupProvider.notifier)
+ .configureBackgroundBackup(
+ enabled: !isBackgroundEnabled,
+ onError: showErrorToUser,
+ onBatteryInfo: showBatteryOptimizationInfoToUser,
+ ),
child: Text(
isBackgroundEnabled
? "backup_controller_page_background_turn_off"
: "backup_controller_page_background_turn_on",
- style:
- const TextStyle(fontWeight: FontWeight.bold, fontSize: 12),
+ style: const TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 12,
+ ),
).tr(),
),
],
@@ -434,7 +440,7 @@ class BackupControllerPage extends HookConsumerWidget {
borderRadius: BorderRadius.circular(20),
side: BorderSide(
color: isDarkMode
- ? const Color.fromARGB(255, 101, 101, 101)
+ ? const Color.fromARGB(255, 56, 56, 56)
: Colors.black12,
width: 1,
),
@@ -534,7 +540,7 @@ class BackupControllerPage extends HookConsumerWidget {
borderRadius: BorderRadius.circular(20), // if you need this
side: BorderSide(
color: isDarkMode
- ? const Color.fromARGB(255, 101, 101, 101)
+ ? const Color.fromARGB(255, 56, 56, 56)
: Colors.black12,
width: 1,
),