Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagocarvalhodev committed Oct 29, 2024
1 parent ce762d5 commit a8d4fad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/blocs/drive_detail/drive_detail_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,6 @@ class DriveDetailCubit extends Cubit<DriveDetailState> {
return;
}

if (driveId != _driveId) {
await _folderSubscription?.cancel();
_folderSubscription = null;
return;
}

await _syncCubit.waitCurrentSync();

if (drive == null) {
Expand Down Expand Up @@ -294,6 +288,8 @@ class DriveDetailCubit extends Cubit<DriveDetailState> {

logger.e('An error occured mouting the drive explorer', e);
});

await _folderSubscription?.asFuture();
}

List<ArDriveDataTableItem> parseEntitiesToDatatableItem({
Expand Down
8 changes: 8 additions & 0 deletions lib/blocs/fs_entry_info/fs_entry_info_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class FsEntryInfoCubit extends Cubit<FsEntryInfoState> {
.asStream()
.listen(
(f) async {
if (isClosed) {
return;
}

final metadataTxId = await _driveDao
.latestFolderRevisionByFolderId(
driveId: driveId, folderId: selectedItem.id)
Expand Down Expand Up @@ -132,6 +136,10 @@ class FsEntryInfoCubit extends Cubit<FsEntryInfoState> {
.watchSingle()
.listen(
(d) async {
if (isClosed) {
return;
}

final rootFolderRevision = await _driveDao
.latestFolderRevisionByFolderId(
folderId: d.rootFolderId,
Expand Down

0 comments on commit a8d4fad

Please sign in to comment.