Skip to content

Commit

Permalink
Show a loading dialog when loading the repo creation page
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Pabon committed Aug 13, 2024
1 parent 7fc971f commit 511b814
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/app/cubits/repo_creation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import 'dart:io' show File;

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../models/auth_mode.dart';
import '../models/local_secret.dart';
import '../models/repo_location.dart';
import '../utils/extensions.dart';
import '../utils/log.dart';
import 'package:ouisync/ouisync.dart' show AccessMode, ShareToken;

import '../../generated/l10n.dart';
import '../models/auth_mode.dart';
import '../models/local_secret.dart';
import '../models/repo_entry.dart';
import '../models/repo_location.dart';
import '../utils/dialogs.dart';
import '../utils/log.dart';
import '../utils/strings.dart';
import 'repos.dart';

Expand Down Expand Up @@ -258,7 +258,7 @@ class RepoCreationCubit extends Cubit<RepoCreationState> with AppLogger {
Future<R> _loading<R>(Future<R> Function() f) async {
try {
emit(state.copyWith(loading: true));
return await f();
return await Dialogs.executeFutureWithLoadingDialog(null, f.call());
} finally {
emit(state.copyWith(loading: false));
}
Expand Down

0 comments on commit 511b814

Please sign in to comment.