Skip to content

Commit

Permalink
fix: add connectivity check
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkrieger committed Jul 28, 2022
1 parent 9ec92e6 commit 0423cc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/repositories/drive_backup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ Future<void> ifShouldBackup() async {
0)) {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
if (connectivityResult != ConnectivityResult.none && !backingUp) {
if (connectivityResult != ConnectivityResult.none &&
connectivityResult != ConnectivityResult.mobile &&
!backingUp) {
Sentry.addBreadcrumb(Breadcrumb(
message: "Initiating auto back up", timestamp: DateTime.now()));
backingUp = true;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.24.0+96
version: 1.24.1+97

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit 0423cc9

Please sign in to comment.