Perform the 'git merge' in the 'cloning ..' screen

This step can take a lot of time, and I would prefer if the user didn't
see a blank screen after cloning for a short while.
This commit is contained in:
Vishesh Handa
2020-12-26 17:18:11 +01:00
parent 75733c9246
commit 360ece0de7
2 changed files with 52 additions and 53 deletions

View File

@ -408,8 +408,8 @@ class Repository with ChangeNotifier {
});
}
void completeGitHostSetup(String repoFolderName, String remoteName) {
() async {
Future<void> completeGitHostSetup(
String repoFolderName, String remoteName) async {
var repoPath = p.join(gitBaseDirectory, repoFolderName);
Log.i("completeGitHostSetup repoPath: $repoPath");
@ -470,7 +470,6 @@ class Repository with ChangeNotifier {
_syncNotes();
notifyListeners();
}();
}
Future _persistConfig() async {

View File

@ -31,7 +31,7 @@ import 'package:gitjournal/utils/logger.dart';
class GitHostSetupScreen extends StatefulWidget {
final String repoFolderName;
final String remoteName;
final Func2<String, String, void> onCompletedFunction;
final Func2<String, String, Future<void>> onCompletedFunction;
GitHostSetupScreen({
@required this.repoFolderName,
@ -555,8 +555,8 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
Event.GitHostSetupComplete,
parameters: _buildOnboardingAnalytics(),
);
await widget.onCompletedFunction(widget.repoFolderName, widget.remoteName);
Navigator.pop(context);
widget.onCompletedFunction(widget.repoFolderName, widget.remoteName);
}
Future<void> _completeAutoConfigure() async {