mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 02:48:51 +08:00
Remove code duplication
This commit is contained in:
@ -89,35 +89,30 @@ class GitHostSetupAutoConfigureState extends State<GitHostSetupAutoConfigure> {
|
||||
}
|
||||
Settings.instance.save();
|
||||
} on GitHostException catch (e) {
|
||||
Fimber.d("GitHostSetupAutoConfigure: " + e.toString());
|
||||
setState(() {
|
||||
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
||||
getAnalytics().logEvent(
|
||||
name: "githostsetup_error",
|
||||
parameters: <String, dynamic>{
|
||||
'errorMessage': errorMessage,
|
||||
},
|
||||
);
|
||||
});
|
||||
_handleGitHostException(e);
|
||||
return;
|
||||
}
|
||||
widget.onDone(repo.cloneUrl);
|
||||
});
|
||||
gitHost.launchOAuthScreen();
|
||||
} on GitHostException catch (e) {
|
||||
Fimber.d("GitHostSetupAutoConfigure: " + e.toString());
|
||||
setState(() {
|
||||
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
||||
getAnalytics().logEvent(
|
||||
name: "githostsetup_error",
|
||||
parameters: <String, dynamic>{
|
||||
'errorMessage': errorMessage,
|
||||
},
|
||||
);
|
||||
});
|
||||
_handleGitHostException(e);
|
||||
}
|
||||
}
|
||||
|
||||
void _handleGitHostException(GitHostException e) {
|
||||
Fimber.d("GitHostSetupAutoConfigure: " + e.toString());
|
||||
setState(() {
|
||||
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
||||
getAnalytics().logEvent(
|
||||
name: "githostsetup_error",
|
||||
parameters: <String, dynamic>{
|
||||
'errorMessage': errorMessage,
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (_configuringStarted) {
|
||||
|
Reference in New Issue
Block a user