Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagocarvalhodev committed Jun 24, 2024
1 parent 2257e17 commit bc5c2dc
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 34 deletions.
62 changes: 45 additions & 17 deletions lib/components/details_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -739,16 +739,23 @@ class _DetailsPanelState extends State<DetailsPanel> {
leading: Row(
mainAxisSize: MainAxisSize.min,
children: [
ArDriveIconButton(
tooltip: appLocalizationsOf(context).viewOnViewBlock,
icon: ArDriveIcons.newWindow(size: 20),
onPressed: () {
openUrl(
url:
'https://viewblock.io/arweave/tx/${state.metadataTxId}',
);
},
Text(
'${state.metadataTxId.substring(0, 4)}...',
style: ArDriveTypography.body
.buttonNormalRegular()
.copyWith(decoration: TextDecoration.underline),
),
// const SizedBox(width: 4),
// ArDriveIconButton(
// tooltip: appLocalizationsOf(context).viewOnViewBlock,
// icon: ArDriveIcons.newWindow(size: 20),
// onPressed: () {
// openUrl(
// url:
// 'https://viewblock.io/arweave/tx/${state.metadataTxId}',
// );
// },
// ),
const SizedBox(width: 12),
CopyButton(
text: state.metadataTxId,
Expand All @@ -762,15 +769,36 @@ class _DetailsPanelState extends State<DetailsPanel> {
leading: Row(
mainAxisSize: MainAxisSize.min,
children: [
ArDriveIconButton(
tooltip: appLocalizationsOf(context).viewOnViewBlock,
icon: ArDriveIcons.newWindow(size: 20),
onPressed: () {
openUrl(
url: 'https://viewblock.io/arweave/tx/${item.dataTxId}',
);
},
// only first 4 characters of the data tx id are shown
ArDriveClickArea(
child: GestureDetector(
onTap: () {
openUrl(
url: 'https://viewblock.io/arweave/tx/${item.dataTxId}',
);
},
child: Tooltip(
message: item.dataTxId,
child: Text(
'${item.dataTxId.substring(0, 4)}...',
style:
ArDriveTypography.body.buttonNormalRegular().copyWith(
decoration: TextDecoration.underline,
),
),
),
),
),
// const SizedBox(width: 4),
// ArDriveIconButton(
// tooltip: appLocalizationsOf(context).viewOnViewBlock,
// icon: ArDriveIcons.newWindow(size: 20),
// onPressed: () {
// openUrl(
// url: 'https://viewblock.io/arweave/tx/${item.dataTxId}',
// );
// },
// ),
const SizedBox(width: 12),
CopyButton(
text: item.dataTxId,
Expand Down
4 changes: 2 additions & 2 deletions lib/entities/license_assertion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class LicenseAssertionEntity with TransactionPropertiesMixin {
TransactionCommonMixin transaction,
) {
try {
// assert(transaction.getTag(LicenseTag.appName) ==
// LicenseTag.appNameLicenseAssertion);
assert(transaction.getTag(LicenseTag.appName) ==
LicenseTag.appNameLicenseAssertion);
final additionalTags = Map.fromEntries(transaction.tags
.where((tag) => !licenseAssertionTxBaseTagKeys.contains(tag.name))
.map((tag) => MapEntry(tag.name, tag.value)));
Expand Down
9 changes: 3 additions & 6 deletions lib/pages/drive_detail/components/drive_detail_data_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,9 @@ class DriveDataTableItemMapper {
index: 0,
pinnedDataOwnerAddress: fileEntry.pinnedDataOwnerAddress,
isHidden: fileEntry.isHidden,
// thumbnailUrl: fileEntry.thumbnail != null
// ? Thumbnail.fromJson(jsonDecode(fileEntry.thumbnail!))
// .variants
// .first
// .txId
// : null,
thumbnail: fileEntry.thumbnail != null
? Thumbnail.fromJson(jsonDecode(fileEntry.thumbnail!))
: null,
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ardrive_uploader/lib/src/ardrive_uploader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class _ArDriveUploader implements ArDriveUploader {
StreamController<UploadProgress>(),
uploadSender,
numOfWorkers: driveKey != null ? 2 : 5,
maxTasksPerWorker: driveKey != null ? 3 : 3,
maxTasksPerWorker: 3,
);

for (var f in files) {
Expand Down
8 changes: 0 additions & 8 deletions packages/ardrive_uploader/lib/src/upload_strategy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,6 @@ class UploadFileUsingDataItemFiles extends UploadFileStrategy {
error: result.error,
);
}

// final updatedTask = controller.tasks[task.id]!;

// controller.updateProgress(
// task: updatedTask.copyWith(
// status: UploadStatus.complete,
// ),
// );
}
}

Expand Down

0 comments on commit bc5c2dc

Please sign in to comment.