Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:atsign-foundation/atmosphere_pro
Browse files Browse the repository at this point in the history
  • Loading branch information
sachins-geekyants committed Mar 30, 2023
2 parents 37654d8 + 39e3c06 commit 3f4e769
Show file tree
Hide file tree
Showing 23 changed files with 892 additions and 422 deletions.
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Contributing guidelines

We :heart: [Pull Requests](https://help.github.com/articles/about-pull-requests/)
We 💙 [Pull Requests](https://help.github.com/articles/about-pull-requests/)
for fixing issues or adding features. Thanks for your contribution!

Please read our [code of conduct](code_of_conduct.md), which is based on
Expand All @@ -13,13 +13,15 @@ For small changes, especially documentation, you can simply use the "Edit" butto
to update the Markdown file, and start the
[pull request](https://help.github.com/articles/about-pull-requests/) process.
Use the preview tab in GitHub to make sure that it is properly
formatted before committing.
formatted before committing. Please use conventional commits and follow the semantic PR format as documented
[here](https://github.com/atsign-foundation/.github/blob/trunk/atGitHub.md#semantic-prs).
A pull request will cause integration tests to run automatically, so please review
the results of the pipeline and correct any mistakes that are reported.

If you plan to contribute often or have a larger change to make, it is best to
setup an environment for contribution, which is what the rest of these guidelines
describe.
describe. The atsign-foundation GitHub organization's conventions and configurations are documented
[here](https://github.com/atsign-foundation/.github/blob/trunk/atGitHub.md).

## Development Environment Setup

Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ android {
applicationId "com.atsign.atsign_atmosphere_pro"
multiDexEnabled true
minSdkVersion 24
targetSdkVersion 30
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
Expand Down
10 changes: 8 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ PODS:
- Flutter
- biometric_storage (0.0.1):
- Flutter
- device_info_plus (0.0.1):
- Flutter
- DKImagePickerController/Core (4.3.3):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
Expand Down Expand Up @@ -115,6 +117,7 @@ DEPENDENCIES:
- at_file_saver (from `.symlinks/plugins/at_file_saver/ios`)
- at_onboarding_flutter (from `.symlinks/plugins/at_onboarding_flutter/ios`)
- biometric_storage (from `.symlinks/plugins/biometric_storage/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- emoji_picker_flutter (from `.symlinks/plugins/emoji_picker_flutter/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
Expand Down Expand Up @@ -160,6 +163,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/at_onboarding_flutter/ios"
biometric_storage:
:path: ".symlinks/plugins/biometric_storage/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
emoji_picker_flutter:
:path: ".symlinks/plugins/emoji_picker_flutter/ios"
file_picker:
Expand Down Expand Up @@ -206,10 +211,11 @@ SPEC CHECKSUMS:
at_file_saver: c0e052c72d8c0296318bd70f2ae7f510887014ce
at_onboarding_flutter: e8219b6d0bfb236d3837ec3528871aebdcc56e8d
biometric_storage: 1400f1382af3a4cc2bf05340e13c3d8de873ceb9
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
DKImagePickerController: 72fd378f244cef3d27288e0aebf217a4467e4012
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
emoji_picker_flutter: df19dac03a2b39ac667dc8d1da939ef3a9e21347
file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433
flutter_keychain: 01aabf894ffe8b01adfda1d9df21c210c1b4b452
Expand All @@ -233,7 +239,7 @@ SPEC CHECKSUMS:
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
video_compress: fce97e4fb1dfd88175aa07d2ffc8a2f297f87fbe
video_thumbnail: c4e2a3c539e247d4de13cd545344fd2d26ffafd1
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a

PODFILE CHECKSUM: db1b3d34103b9bca35e1d0bca266af8024bec0bc

Expand Down
28 changes: 15 additions & 13 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -282,6 +282,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -296,6 +297,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -415,7 +417,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 50;
CURRENT_PROJECT_VERSION = 52;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "Share Extension/Info.plist";
Expand All @@ -425,7 +427,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.9;
MARKETING_VERSION = 1.0.10;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro.ShareExtension";
Expand All @@ -448,7 +450,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 50;
CURRENT_PROJECT_VERSION = 52;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "Share Extension/Info.plist";
Expand All @@ -458,7 +460,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.9;
MARKETING_VERSION = 1.0.10;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro.ShareExtension";
PRODUCT_NAME = "@mosphere-pro";
Expand All @@ -478,7 +480,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 50;
CURRENT_PROJECT_VERSION = 52;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "Share Extension/Info.plist";
Expand All @@ -488,7 +490,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.9;
MARKETING_VERSION = 1.0.10;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro.ShareExtension";
PRODUCT_NAME = "@mosphere-pro";
Expand Down Expand Up @@ -560,7 +562,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 50;
CURRENT_PROJECT_VERSION = 52;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -577,7 +579,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.9;
MARKETING_VERSION = 1.0.10;
PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -708,7 +710,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 50;
CURRENT_PROJECT_VERSION = 52;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -725,7 +727,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.9;
MARKETING_VERSION = 1.0.10;
PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -747,7 +749,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 50;
CURRENT_PROJECT_VERSION = 52;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -764,7 +766,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.9;
MARKETING_VERSION = 1.0.10;
PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
<string>Enable atmospherePro to save images and videos in photos after being downloaded. </string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Enable atmospherePro to access your photos to upload the ones you choose in file transfer.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIFileSharingEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:at_contacts_flutter/services/contact_service.dart';
import 'package:atsign_atmosphere_pro/data_models/file_transfer.dart';
import 'package:atsign_atmosphere_pro/screens/common_widgets/add_contact.dart';
import 'package:atsign_atmosphere_pro/screens/common_widgets/confirmation_dialog.dart';
import 'package:atsign_atmosphere_pro/screens/common_widgets/confirmation_item_delete.dart';
import 'package:atsign_atmosphere_pro/screens/common_widgets/contact_initial.dart';
import 'package:atsign_atmosphere_pro/screens/common_widgets/custom_button.dart';
import 'package:atsign_atmosphere_pro/screens/common_widgets/custom_circle_avatar.dart';
Expand Down Expand Up @@ -695,64 +696,29 @@ class _DesktopReceivedFilesListTileState

deleteReceivedItem() async {
await showDialog(
context: NavService.navKey.currentContext!,
builder: (context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.toWidth),
),
content: ConfirmationDialog(TextStrings.deleteFileConfirmationMsg,
() async {
var res =
await Provider.of<HistoryProvider>(context, listen: false)
.deleteReceivedItem(widget.receivedHistory!);

if (res) {
SnackbarService().showSnackbar(
NavService.navKey.currentContext!,
'Removed from received items list',
bgColor: ColorConstants.successGreen);
await deleteFileWhenRecevedItemRemoved();
} else {
SnackbarService().showSnackbar(
NavService.navKey.currentContext!, 'Failed',
bgColor: ColorConstants.redAlert);
}
}));
});
}

deleteFileWhenRecevedItemRemoved() async {
await showDialog(
context: NavService.navKey.currentContext!,
builder: (context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.toWidth),
),
content: ConfirmationDialog(
TextStrings.deleteDownloadedFileMessage, () async {
await Future.forEach(widget.receivedHistory!.files!,
(FileData element) async {
String filePath = MixedConstants.RECEIVED_FILE_DIRECTORY +
Platform.pathSeparator +
(widget.receivedHistory!.sender ?? '') +
Platform.pathSeparator +
(element.name ?? '');

if (await CommonUtilityFunctions().isFilePresent(filePath)) {
var file = File(filePath);
if (await file.existsSync()) {
file.deleteSync();
}
}
});
context: NavService.navKey.currentContext!,
builder: (context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.toWidth),
),
content: ConfirmationItemDelete(TextStrings.deleteFileConfirmationMsg,
() async {
var res = await Provider.of<HistoryProvider>(context, listen: false)
.deleteReceivedItem(widget.receivedHistory!);

await Provider.of<MyFilesProvider>(
NavService.navKey.currentContext!,
listen: false)
.deletMyFileRecord(widget.receivedHistory!.key);
}));
});
if (res) {
SnackbarService().showSnackbar(NavService.navKey.currentContext!,
'Removed from received items list',
bgColor: ColorConstants.successGreen);
} else {
SnackbarService().showSnackbar(
NavService.navKey.currentContext!, 'Failed',
bgColor: ColorConstants.redAlert);
}
}, widget.receivedHistory),
);
},
);
}
}
9 changes: 9 additions & 0 deletions lib/desktop_screens/desktop_home/desktop_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ import 'package:atsign_atmosphere_pro/screens/common_widgets/custom_onboarding.d
import 'package:atsign_atmosphere_pro/services/backend_service.dart';
import 'package:at_common_flutter/services/size_config.dart';
import 'package:atsign_atmosphere_pro/services/common_utility_functions.dart';
import 'package:atsign_atmosphere_pro/services/navigation_service.dart';
import 'package:atsign_atmosphere_pro/utils/colors.dart';
import 'package:atsign_atmosphere_pro/utils/constants.dart';
import 'package:atsign_atmosphere_pro/utils/images.dart';
import 'package:atsign_atmosphere_pro/utils/text_strings.dart';
import 'package:atsign_atmosphere_pro/utils/text_styles.dart';
import 'package:atsign_atmosphere_pro/view_models/internet_connectivity_checker.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart';

class DesktopHome extends StatefulWidget {
const DesktopHome({Key? key}) : super(key: key);
Expand Down Expand Up @@ -51,6 +54,12 @@ class _DesktopHomeState extends State<DesktopHome> {

@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) async {
Provider.of<InternetConnectivityChecker>(
NavService.navKey.currentContext!,
listen: false)
.checkConnectivity();
});
storeApplicationDocumentsDirectory();
super.initState();
}
Expand Down
Loading

0 comments on commit 3f4e769

Please sign in to comment.