1
0
mirror of https://github.com/git-touch/git-touch synced 2025-02-20 21:40:44 +01:00

improvement: trim login credentials

This commit is contained in:
Rongjian Zhang 2020-02-06 14:38:43 +08:00
parent cccf56d944
commit 181c6b297a

View File

@ -136,6 +136,8 @@ class AuthModel with ChangeNotifier {
}
Future<void> loginToGitlab(String domain, String token) async {
domain = domain.trim();
token = token.trim();
loading = true;
notifyListeners();
try {
@ -191,6 +193,8 @@ class AuthModel with ChangeNotifier {
}
Future loginToGitea(String domain, String token) async {
domain = domain.trim();
token = token.trim();
try {
loading = true;
notifyListeners();
@ -235,6 +239,9 @@ class AuthModel with ChangeNotifier {
}
Future loginToBb(String domain, String username, String appPassword) async {
domain = domain.trim();
username = username.trim();
appPassword = appPassword.trim();
try {
loading = true;
notifyListeners();