Skip to content

Commit

Permalink
Merge pull request #140 from TheRedSpy15/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
TheRedSpy15 committed May 20, 2024
2 parents f7557e4 + 343eeb4 commit 5c2c31c
Show file tree
Hide file tree
Showing 29 changed files with 67 additions and 21 deletions.
1 change: 1 addition & 0 deletions lib/generated/intl/messages_de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Wählen Sie den Ordner auf Ihrem Gerät aus, in dem Ihre Kamera-App Fotos und Videos speichert. Sucht nicht rekursiv nach Dateien. Synchronisiert ungefähr alle 6 Stunden."),
"cameraRollSync": MessageLookupByLibrary.simpleMessage(
"Kamerarollen-Synchronisierung"),
"cameraSync": MessageLookupByLibrary.simpleMessage("Kamerasync"),
"cancel": MessageLookupByLibrary.simpleMessage("Abbrechen"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("Download-Speicherort ändern"),
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Select the folder on your device that your camera app saves photos and videos to. Does not recursively search for files. Syncs approximately every 6 hours"),
"cameraRollSync":
MessageLookupByLibrary.simpleMessage("Camera Roll Sync"),
"cameraSync": MessageLookupByLibrary.simpleMessage("Camera Sync"),
"cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("Change Download Location"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_es.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Seleccione la carpeta en su dispositivo donde su aplicación de cámara guarda fotos y videos. No busca de forma recursiva archivos. Sincroniza aproximadamente cada 6 horas."),
"cameraRollSync": MessageLookupByLibrary.simpleMessage(
"Sincronización de rollo de cámara"),
"cameraSync":
MessageLookupByLibrary.simpleMessage("Sincronización de cámara"),
"cancel": MessageLookupByLibrary.simpleMessage("Cancelar"),
"changeDownloadLocation": MessageLookupByLibrary.simpleMessage(
"Cambiar ubicación de descarga"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Sélectionnez le dossier sur votre appareil où votre application de caméra enregistre les photos et les vidéos. Ne recherche pas de manière récursive les fichiers. Synchronise environ toutes les 6 heures."),
"cameraRollSync": MessageLookupByLibrary.simpleMessage(
"Synchronisation du rouleau de caméra"),
"cameraSync":
MessageLookupByLibrary.simpleMessage("Synchronisation de caméra"),
"cancel": MessageLookupByLibrary.simpleMessage("Annuler"),
"changeDownloadLocation": MessageLookupByLibrary.simpleMessage(
"Changer l\'\'emplacement de téléchargement"),
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_hi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class MessageLookup extends MessageLookupByLibrary {
"अपनी डिवाइस पर फोटो और वीडियो सहेजने वाले आपके कैमरा ऐप के फ़ोल्डर का चयन करें। फ़ाइलों को अनुक्रमणिक ढंग से खोजता नहीं है। लगभग हर 6 घंटे में सिंक्रनाइज़ करता है।"),
"cameraRollSync":
MessageLookupByLibrary.simpleMessage("कैमरा रोल सिंक्रनाइज़ेशन"),
"cameraSync": MessageLookupByLibrary.simpleMessage("कैमरा सिंक"),
"cancel": MessageLookupByLibrary.simpleMessage("रद्द करें"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("डाउनलोड स्थान बदलें"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_it.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Seleziona la cartella sul tuo dispositivo in cui l\'\'app della fotocamera salva foto e video. Non cerca ricorsivamente i file. Sincronizza approssimativamente ogni 6 ore."),
"cameraRollSync": MessageLookupByLibrary.simpleMessage(
"Sincronizzazione del rullino fotografico"),
"cameraSync":
MessageLookupByLibrary.simpleMessage("Sincronizzazione fotocamera"),
"cancel": MessageLookupByLibrary.simpleMessage("Annulla"),
"changeDownloadLocation": MessageLookupByLibrary.simpleMessage(
"Cambia posizione di download"),
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_ja.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class MessageLookup extends MessageLookupByLibrary {
"camSyncDesc": MessageLookupByLibrary.simpleMessage(
"写真や動画を保存するデバイス上のフォルダーを選択します。ファイルを再帰的に検索しません。約6時間ごとに同期します。"),
"cameraRollSync": MessageLookupByLibrary.simpleMessage("カメラロール同期"),
"cameraSync": MessageLookupByLibrary.simpleMessage("カメラ同期"),
"cancel": MessageLookupByLibrary.simpleMessage("キャンセル"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("ダウンロード場所の変更"),
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_ko.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class MessageLookup extends MessageLookupByLibrary {
"camSyncDesc": MessageLookupByLibrary.simpleMessage(
"카메라 앱이 사진과 비디오를 저장하는 기기의 폴더를 선택합니다. 파일을 재귀적으로 검색하지 않습니다. 대략 6시간마다 동기화됩니다."),
"cameraRollSync": MessageLookupByLibrary.simpleMessage("카메라 롤 동기화"),
"cameraSync": MessageLookupByLibrary.simpleMessage("카메라 동기화"),
"cancel": MessageLookupByLibrary.simpleMessage("취소"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("다운로드 위치 변경"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_pt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Selecione a pasta em seu dispositivo onde seu aplicativo de câmera salva fotos e vídeos. Não pesquisa de forma recursiva os arquivos. Sincroniza aproximadamente a cada 6 horas."),
"cameraRollSync": MessageLookupByLibrary.simpleMessage(
"Sincronização de rolo de câmera"),
"cameraSync":
MessageLookupByLibrary.simpleMessage("Sincronização da câmera"),
"cancel": MessageLookupByLibrary.simpleMessage("Cancelar"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("Alterar local de download"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Выберите папку на вашем устройстве, куда ваше камерное приложение сохраняет фотографии и видео. Не рекурсивно ищет файлы. Синхронизирует примерно каждые 6 часов."),
"cameraRollSync":
MessageLookupByLibrary.simpleMessage("Синхронизация камеры"),
"cameraSync":
MessageLookupByLibrary.simpleMessage("Синхронизация камеры"),
"cancel": MessageLookupByLibrary.simpleMessage("Отмена"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("Изменить место загрузки"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_uk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Виберіть теку на вашому пристрої, куди ваше камерне додаток зберігає фотографії та відео. Не рекурсивно шукає файли. Синхронізує приблизно кожні 6 годин."),
"cameraRollSync":
MessageLookupByLibrary.simpleMessage("Синхронізація ролі камери"),
"cameraSync":
MessageLookupByLibrary.simpleMessage("Синхронізація камери"),
"cancel": MessageLookupByLibrary.simpleMessage("Скасувати"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("Змінити місце завантаження"),
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class MessageLookup extends MessageLookupByLibrary {
"camSyncDesc": MessageLookupByLibrary.simpleMessage(
"选择设备上您的相机应用程序保存照片和视频的文件夹。不递归搜索文件。大约每 6 小时同步一次。"),
"cameraRollSync": MessageLookupByLibrary.simpleMessage("相册同步"),
"cameraSync": MessageLookupByLibrary.simpleMessage("相机同步"),
"cancel": MessageLookupByLibrary.simpleMessage("取消"),
"changeDownloadLocation":
MessageLookupByLibrary.simpleMessage("更改下载位置"),
Expand Down
10 changes: 10 additions & 0 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/l10n/intl_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "Pfad ändern",
"syncing": "Synchronisierung...",
"periodicallyBackingUpSelectedFolder": "Ausgewählten Ordner regelmäßig sichern",
"syncNow": "Jetzt synchronisieren"
"syncNow": "Jetzt synchronisieren",
"cameraSync": "Kamerasync"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "Change Path",
"syncing": "Syncing...",
"periodicallyBackingUpSelectedFolder": "Periodically backing up selected folder",
"syncNow": "Sync Now"
"syncNow": "Sync Now",
"cameraSync": "Camera Sync"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "Cambiar ruta",
"syncing": "Sincronizando...",
"periodicallyBackingUpSelectedFolder": "Haciendo copia de seguridad periódicamente de la carpeta seleccionada",
"syncNow": "Sincronizar ahora"
"syncNow": "Sincronizar ahora",
"cameraSync": "Sincronización de cámara"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "Changer le chemin",
"syncing": "Synchronisation en cours...",
"periodicallyBackingUpSelectedFolder": "Sauvegarde périodique du dossier sélectionné",
"syncNow": "Synchroniser maintenant"
"syncNow": "Synchroniser maintenant",
"cameraSync": "Synchronisation de caméra"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_hi.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "पथ बदलें",
"syncing": "सिंक्रनाइज़ किया जा रहा है...",
"periodicallyBackingUpSelectedFolder": "चयनित फ़ोल्डर का नियमित रूप से बैकअप लेना",
"syncNow": "अब सिंक्रनाइज़ करें"
"syncNow": "अब सिंक्रनाइज़ करें",
"cameraSync": "कैमरा सिंक"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_it.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "Cambia percorso",
"syncing": "Sincronizzazione in corso...",
"periodicallyBackingUpSelectedFolder": "Backup periodico della cartella selezionata",
"syncNow": "Sincronizza ora"
"syncNow": "Sincronizza ora",
"cameraSync": "Sincronizzazione fotocamera"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "パスを変更",
"syncing": "同期中...",
"periodicallyBackingUpSelectedFolder": "選択したフォルダーを定期的にバックアップしています",
"syncNow": "今すぐ同期"
"syncNow": "今すぐ同期",
"cameraSync": "カメラ同期"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ko.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "경로 변경",
"syncing": "동기화 중...",
"periodicallyBackingUpSelectedFolder": "선택한 폴더 주기적으로 백업",
"syncNow": "지금 동기화"
"syncNow": "지금 동기화",
"cameraSync": "카메라 동기화"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "Alterar caminho",
"syncing": "Sincronizando...",
"periodicallyBackingUpSelectedFolder": "Fazendo backup periodicamente da pasta selecionada",
"syncNow": "Sincronizar agora"
"syncNow": "Sincronizar agora",
"cameraSync": "Sincronização da câmera"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "Изменить путь",
"syncing": "Синхронизация...",
"periodicallyBackingUpSelectedFolder": "Периодически создается резервная копия выбранной папки",
"syncNow": "Синхронизировать сейчас"
"syncNow": "Синхронизировать сейчас",
"cameraSync": "Синхронизация камеры"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_uk.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "Змінити шлях",
"syncing": "Синхронізація...",
"periodicallyBackingUpSelectedFolder": "Періодично створюється резервна копія обраної теки",
"syncNow": "Синхронізувати зараз"
"syncNow": "Синхронізувати зараз",
"cameraSync": "Синхронізація камери"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@
"changeSyncPath": "更改路径",
"syncing": "同步中...",
"periodicallyBackingUpSelectedFolder": "定期备份所选文件夹",
"syncNow": "立即同步"
"syncNow": "立即同步",
"cameraSync": "相机同步"
}
6 changes: 3 additions & 3 deletions lib/pages/dashboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class Dashboard extends ConsumerWidget {
child: const Icon(Icons.cloud_sync)),
label: S.of(context).transfers,
),
const NavigationDestination(
icon: Icon(Icons.camera_alt),
label: "Camera Sync",
NavigationDestination(
icon: const Icon(Icons.camera_alt),
label: S.of(context).cameraSync,
),
NavigationDestination(
icon: const Icon(Icons.settings),
Expand Down
12 changes: 9 additions & 3 deletions lib/utils/sync_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void updateSyncWorker(String uid, String token, bool allowMetered,
"folderSync",
"folderSync",
//frequency: Duration(minutes: syncFrequency),
frequency: const Duration(minutes: 360),
frequency: const Duration(hours: 6),
constraints: Constraints(
networkType: allowMetered ? NetworkType.connected : NetworkType.unmetered,
requiresBatteryNotLow: true,
Expand All @@ -150,7 +150,13 @@ void updateSyncWorker(String uid, String token, bool allowMetered,
);
}

void updateSyncWorkerWithRef(WidgetRef ref) {
void updateSyncWorkerWithRef(WidgetRef ref) async {
final prefs = await SharedPreferences.getInstance();
if (prefs.getBool("syncEnabled") == false) {
Workmanager().cancelByUniqueName("folderSync");
return;
}

if (!ref.read(watchEnabledProvider)) {
Workmanager().cancelByUniqueName("folderSync");
return;
Expand All @@ -160,7 +166,7 @@ void updateSyncWorkerWithRef(WidgetRef ref) {
"folderSync",
"folderSync",
//frequency: Duration(minutes: ref.read(syncFrequencyProvider)),
frequency: const Duration(minutes: 360),
frequency: const Duration(hours: 6),
constraints: Constraints(
networkType: ref.read(allowMeteredProvider)
? NetworkType.connected
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: "7685acd06244ba4be60f455c5cafe5790c63dc91fc03f7385b1e922a6b85b17c"
sha256: aa073287b8f43553678e6fa9e8bb9c83212ff76e09542129a8099bbc8db4df65
url: "https://pub.dev"
source: hosted
version: "14.1.1"
version: "14.1.2"
http:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
# format: x.x.x+x0x0x
version: 1.5.1+10501
version: 1.5.2+10502

environment:
sdk: '>=3.1.2 <4.0.0'
Expand Down

0 comments on commit 5c2c31c

Please sign in to comment.