Skip to content

Commit

Permalink
Merge pull request #1386 from ardriveapp/PE-3953-sync-can-happen-in-b…
Browse files Browse the repository at this point in the history
…ackground-when-creating-a-snapshot

PE-3953: sync-can-happen-in-background-when-creating-a-snapshot
  • Loading branch information
kunstmusik authored Sep 27, 2023
2 parents bbee6c2 + d94ce5b commit 5f41cea
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions lib/components/create_snapshot_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:ardrive/blocs/profile/profile_cubit.dart';
import 'package:ardrive/components/components.dart';
import 'package:ardrive/entities/string_types.dart';
import 'package:ardrive/models/models.dart';
import 'package:ardrive/pages/user_interaction_wrapper.dart';
import 'package:ardrive/services/arweave/arweave.dart';
import 'package:ardrive/services/pst/pst.dart';
import 'package:ardrive/theme/theme.dart';
Expand All @@ -21,22 +22,24 @@ Future<void> promptToCreateSnapshot(
BuildContext context,
Drive drive,
) async {
return showAnimatedDialog(
context,
barrierDismissible: false,
content: BlocProvider(
create: (_) => CreateSnapshotCubit(
arweave: context.read<ArweaveService>(),
driveDao: context.read<DriveDao>(),
profileCubit: context.read<ProfileCubit>(),
pst: context.read<PstService>(),
tabVisibility: TabVisibilitySingleton(),
),
child: CreateSnapshotDialog(
drive: drive,
),
),
);
return showModalDialog(
context,
() => showAnimatedDialog(
context,
barrierDismissible: false,
content: BlocProvider(
create: (_) => CreateSnapshotCubit(
arweave: context.read<ArweaveService>(),
driveDao: context.read<DriveDao>(),
profileCubit: context.read<ProfileCubit>(),
pst: context.read<PstService>(),
tabVisibility: TabVisibilitySingleton(),
),
child: CreateSnapshotDialog(
drive: drive,
),
),
));
}

class CreateSnapshotDialog extends StatelessWidget {
Expand Down

0 comments on commit 5f41cea

Please sign in to comment.