Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/fix 1.0.10 (55) notes #284

Closed
wants to merge 122 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
048ecbf
Initial Commit
Chandram-Dutta Sep 29, 2022
abc6355
Added Fonts and Assets for new UI
Chandram-Dutta Sep 29, 2022
25a5f12
Added Settings Screen
Chandram-Dutta Sep 29, 2022
77e9944
Update
Chandram-Dutta Sep 29, 2022
047427f
svg files added
AdiAr11 Oct 4, 2022
1d53586
bottom navigation implemented
AdiAr11 Oct 4, 2022
7aa9967
home icon on FAB in settings page
AdiAr11 Oct 4, 2022
65ade8b
added screens whichever were available
AdiAr11 Oct 4, 2022
4fb753e
increased padding
AdiAr11 Oct 4, 2022
2eb0032
made the required changes
AdiAr11 Oct 7, 2022
42ecdb6
minor size change
AdiAr11 Oct 7, 2022
fca7d4d
Updated the imports for uniformity
Chandram-Dutta Oct 10, 2022
d63e2cd
Add: "Inter" fonts
Oct 10, 2022
7c2ae80
Add: Image assets
Oct 10, 2022
3a6f3b0
Update: Sidebar
Oct 10, 2022
2040379
Merge pull request #224 from Chandram-Dutta/ui_redesign
tinashe404 Oct 12, 2022
d33a194
Merge branch 'ui_redesign' of https://github.com/atsign-foundation/at…
Oct 14, 2022
b04e186
icons don't move now
AdiAr11 Oct 15, 2022
123b08f
settings screen implementation started
AdiAr11 Oct 25, 2022
d1b6022
git merge with ui_redesign
AdiAr11 Oct 25, 2022
0bde5c0
made required changes
AdiAr11 Oct 25, 2022
27512eb
removed unused resource
AdiAr11 Oct 25, 2022
8ec447c
settings screen added
AdiAr11 Oct 26, 2022
662cd5e
git merge with ui_redesign
AdiAr11 Oct 26, 2022
7167733
settings screen implemented with a little nav bar
AdiAr11 Oct 26, 2022
76879a9
undo pubspec.lock
AdiAr11 Oct 26, 2022
7d25518
Merge pull request #229 from AdiAr11/aditya_navigation
tinashe404 Oct 27, 2022
0e03654
Merge pull request #238 from ketanvishwakarma/ui_redesign
tinashe404 Oct 31, 2022
bf63e85
resolved conflicts
AdiAr11 Nov 4, 2022
43cade2
reverted gradient_button
AdiAr11 Nov 4, 2022
a587d8a
Merge pull request #242 from AdiAr11/aditya_settings
tinashe404 Nov 16, 2022
be464c3
feat: update UI My Files Screen
sonle-geekyants Jan 17, 2023
6b96df6
feat: update MyFiles Screen
sonle-geekyants Jan 19, 2023
3758026
Merge pull request #246 from atsign-foundation/feature/my-files-screen
sachins-geekyants Jan 30, 2023
9df5109
feat: done transfer history screen
sonle-geekyants Feb 2, 2023
3ae9484
Merge pull request #247 from atsign-foundation/feature/history-screen
sachins-geekyants Feb 2, 2023
8b978d7
feat: welcome home screen updated according to new UI
sachins-geekyants Feb 6, 2023
80c70f9
feat: UI updated for tablet screen
sachins-geekyants Feb 7, 2023
c042752
Merge branch 'ui_redesign' of github.com:atsign-foundation/atmosphere…
sachins-geekyants Feb 7, 2023
78045b1
fix: padding updated fot tablet
sachins-geekyants Feb 8, 2023
7e9d892
feat: download and upload services mapped to transfer History
sachins-geekyants Feb 9, 2023
8b644cc
Merge pull request #249 from atsign-foundation/redesign_welcome_home
sachins-geekyants Feb 10, 2023
d740946
feat: update UI contact screen
sonle-geekyants Feb 10, 2023
34ad937
Merge pull request #251 from atsign-foundation/feature/contact-screen
sachins-geekyants Feb 14, 2023
72f16fe
feat: update contact screen
sonle-geekyants Feb 15, 2023
fdfee67
Merge pull request #252 from atsign-foundation/feature/contact-screen
sachins-geekyants Feb 15, 2023
2c3c25a
fix: transfer history not refreshing on send and receive
sachins-geekyants Feb 15, 2023
7021189
fix: issue with reupload files
sachins-geekyants Feb 15, 2023
b278ea0
Merge pull request #253 from atsign-foundation/feat_history_monitor
sachins-geekyants Feb 16, 2023
887f849
feat: fix UI on tablets
sonle-geekyants Feb 16, 2023
26cc7f1
Merge pull request #254 from atsign-foundation/feature/fix-ui-tablets
sachins-geekyants Feb 16, 2023
e6cba75
feat: update UI Home Screen
sonle-geekyants Feb 16, 2023
3c99802
fix: encryption service param
sachins-geekyants Feb 17, 2023
6c0a90b
fix: download progress UI
sachins-geekyants Feb 17, 2023
3065658
Merge pull request #255 from atsign-foundation/feature/update-home-sc…
sachins-geekyants Feb 17, 2023
0bc2fc7
fix: showing individual entity for multiple atSign
sachins-geekyants Feb 20, 2023
5444860
fix: my files data not showing
sachins-geekyants Feb 20, 2023
c6f02a7
Merge pull request #256 from atsign-foundation/feature/update-home-sc…
sachins-geekyants Feb 20, 2023
e71832c
fix: added toLowerCase check while comparing file
sachins-geekyants Feb 20, 2023
8bed31f
feat: change linear gradient progress
sonle-geekyants Feb 20, 2023
6ff30f8
Merge pull request #257 from atsign-foundation/feature/update-home-sc…
sachins-geekyants Feb 20, 2023
82731f6
Merge pull request #258 from atsign-foundation/feature/linear-gradien…
sachins-geekyants Feb 20, 2023
9cb0620
build : release changes for 1.0.10+51
sachins-geekyants Feb 20, 2023
dafeb66
fix: update and select files
sonle-geekyants Mar 10, 2023
dc96a99
Merge pull request #262 from atsign-foundation/bugfix/update-select-f…
sachins-geekyants Mar 10, 2023
283eb62
feat: fix bug notification routes to history screen
sonle-geekyants Mar 13, 2023
6045a02
Merge pull request #263 from atsign-foundation/bugfix/fix-bug-notific…
sachins-geekyants Mar 15, 2023
4524d94
feat: update UI Welcome Screen
sonle-geekyants Feb 22, 2023
5de583f
feat: update contact screen
sonle-geekyants Feb 24, 2023
9f25efa
feat: add contact group widget
sonle-geekyants Mar 14, 2023
e274093
feat: update UI SendFileScreen
sonle-geekyants Mar 20, 2023
f126cf3
Merge pull request #259 from atsign-foundation/feature/update-home-sc…
sachins-geekyants Mar 29, 2023
9239d08
feat: home screen components updated
sachins-geekyants Mar 30, 2023
d1e1e8e
feat: update UI HomeScreen
sonle-geekyants Mar 31, 2023
fdafc5b
feat: add openFile func
sonle-geekyants Apr 3, 2023
89c96ca
feat: edit UI HomeScreen
sonle-geekyants Apr 12, 2023
4925868
feat: upgrade UI Contact Screen
sonle-geekyants Apr 26, 2023
7f1d470
feat: update new UI
sonle-geekyants Apr 28, 2023
5187d4f
feat: update UI Files Screen
sonle-geekyants May 4, 2023
4e5dc0a
feat: update UI Contact Screen
sonle-geekyants May 5, 2023
2dad532
feat: update icon bottom bar
sonle-geekyants May 5, 2023
28dfbed
feat: update history screen
sonle-geekyants May 5, 2023
b114dcc
feat: created contact detail screen
May 4, 2023
25a0a3d
feat: addded edit nickname functionality
May 5, 2023
c4b0e6f
fix: updated icons and styling
May 5, 2023
5086cc1
feat: update UI History Screen
sonle-geekyants May 5, 2023
6ff2419
feat: update History Screen
sonle-geekyants May 8, 2023
2285b40
feat: update history card
sonle-geekyants May 8, 2023
1d652ae
feat: added filter dialog ui
sonle-geekyants May 8, 2023
a3b6f24
feat: update Filter Dialog
sonle-geekyants May 9, 2023
2709168
feat: update UI History Screen
sonle-geekyants May 9, 2023
d2c3d41
feat: update UI History Screen
sonle-geekyants May 9, 2023
f86b2dc
feat: added download functionality
May 8, 2023
12fb234
feat: added delete file functionality
May 9, 2023
b7a767d
feat: added thumbnail preview in my files screens
May 9, 2023
8620993
feat: removed issues of history list
sonle-geekyants May 9, 2023
d208ab9
Merge branch 'feature/atMospherePro-version-3' of https://github.com/…
sonle-geekyants May 9, 2023
63ab42d
feat: edit search file
sonle-geekyants May 10, 2023
89bbbbe
feat: added search files func
sonle-geekyants May 10, 2023
7b66972
feat: added download functionality
May 8, 2023
90def0c
feat: added delete file functionality
May 9, 2023
601d597
feat: added image description screen
May 10, 2023
45ec204
feat: update UI File Detail Screen
sonle-geekyants May 10, 2023
5ffff02
feat: update Files screen
sonle-geekyants May 11, 2023
8edae74
feat: update Files screen
sonle-geekyants May 11, 2023
ceead91
Merge branch 'feature/atMospherePro-version-3' of https://github.com/…
sonle-geekyants May 15, 2023
e0c98b1
feat: update sort History
sonle-geekyants May 15, 2023
0aa602f
feat: added unblock dialog and preview for files
sonle-geekyants May 16, 2023
f4d5ba8
feat: added unblock dialog and preview for files
sonle-geekyants May 16, 2023
cc7dbfa
feat: clean code
sonle-geekyants May 16, 2023
ef26eac
feat: added moveToSentFile func
sonle-geekyants May 17, 2023
1709da5
fix: resolve mention issues
sonle-geekyants May 23, 2023
d0010f9
feat: remove dependeny_override package in pubspec.yaml
sonle-geekyants May 24, 2023
a51c65c
feat: remove old history when switching atKey and enable add button w…
sonle-geekyants May 25, 2023
db5c902
feat: add dependency override
sonle-geekyants May 26, 2023
016f45e
fix: onboard and trusted issue
sachins-geekyants May 26, 2023
e31f187
Merge branch 'feature/atMospherePro-version-3' of github.com:atsign-f…
sachins-geekyants May 26, 2023
d46a7a2
fix: trusted contacts message not showing
sachins-geekyants May 26, 2023
4a2b403
Merge pull request #282 from atsign-foundation/feature/atMospherePro-…
sachins-geekyants May 29, 2023
1dd7697
build: release changes for 1.0.10+55 mobile platforms
sachins-geekyants May 29, 2023
7e1e5a5
fix: resolve related problems and migrate to Dart 3.0
sonle-geekyants May 31, 2023
5e2ec94
feat: adjust history filter and add onTap for items in File screen St…
sonle-geekyants Jun 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: added download functionality
Sarthak Suresh Bakre authored and sonle-geekyants committed May 10, 2023
commit 7b66972b5b6d865ae6d056957f21586f668fa08e
98 changes: 98 additions & 0 deletions lib/screens/my_files/files_detail_screen.dart
Original file line number Diff line number Diff line change
@@ -22,6 +22,14 @@ import 'package:provider/provider.dart';
import '../../services/backend_service.dart';
import 'widgets/downloads_folders.dart';

import '../../services/common_utility_functions.dart';
import '../../services/navigation_service.dart';
import '../../services/snackbar_service.dart';
import '../../utils/text_strings.dart';
import '../../view_models/file_progress_provider.dart';
import '../../view_models/history_provider.dart';
import '../../view_models/internet_connectivity_checker.dart';

class FilesDetailScreen extends StatefulWidget {
final FileType? type;
final bool? autoFocus;
@@ -159,6 +167,9 @@ class _FilesDetailScreenState extends State<FilesDetailScreen> {
child: Consumer<MyFilesProvider>(
builder: (context, provider, _) {
final files = provider.displayFiles;

//TODO - get file transfer data object from this files(FilesDetail) object.
// TODO - add download consumer using the filetranferData object.
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
@@ -450,6 +461,93 @@ class _FilesDetailScreenState extends State<FilesDetailScreen> {
);
}

Future<bool> downloadFiles(
FileTransfer? file, {
String? fileName,
}) async {
var fileTransferProgress = Provider.of<FileProgressProvider>(
NavService.navKey.currentContext!,
listen: false)
.receivedFileProgress[file!.key];

if (fileTransferProgress != null) {
return false; //returning because download is still in progress
}

var isConnected = Provider.of<InternetConnectivityChecker>(
NavService.navKey.currentContext!,
listen: false)
.isInternetAvailable;

if (!isConnected) {
SnackbarService().showSnackbar(
NavService.navKey.currentContext!,
TextStrings.noInternetMsg,
bgColor: ColorConstants.redAlert,
);
return false;
}

var result;
if (fileName != null) {
result = await Provider.of<HistoryProvider>(
NavService.navKey.currentContext!,
listen: false)
.downloadSingleFile(
file.key,
file.sender,
false,
fileName,
);
} else {
result = await Provider.of<HistoryProvider>(
NavService.navKey.currentContext!,
listen: false)
.downloadFiles(
file.key,
file.sender!,
false,
);
}

if (result is bool && result) {
// if (mounted) {
// // setState(() {
// // isDownloaded = true;
// // });
// }
await Provider.of<MyFilesProvider>(NavService.navKey.currentContext!,
listen: false)
.saveNewDataInMyFiles(file);

SnackbarService().showSnackbar(
NavService.navKey.currentContext!,
TextStrings().fileDownloadd,
bgColor: ColorConstants.successGreen,
);
// send download acknowledgement
await Provider.of<HistoryProvider>(NavService.navKey.currentContext!,
listen: false)
.sendFileDownloadAcknowledgement(file);

return true;
} else if (result is bool && !result) {
SnackbarService().showSnackbar(
NavService.navKey.currentContext!,
TextStrings().downloadFailed,
bgColor: ColorConstants.redAlert,
);
// if (mounted) {
// setState(() {
// // isDownloaded = false;
// });
// }
return false;
}

return false;
}

void _onTapPhotoItem(FilesDetail file) {
showDialog(
context: context,