feat: trim extra space when setting custom source (#771)

This commit is contained in:
EvadeMaster 2023-04-18 17:15:04 +07:00 committed by GitHub
parent dca2d4fe12
commit 37b583f560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,12 +119,12 @@ class SManageSources extends BaseViewModel {
CustomMaterialButton(
label: I18nText('okButton'),
onPressed: () {
_managerAPI.setRepoUrl(_hostSourceController.text);
_managerAPI.setRepoUrl(_hostSourceController.text.trim());
_managerAPI.setPatchesRepo(
'${_orgPatSourceController.text}/${_patSourceController.text}',
'${_orgPatSourceController.text.trim()}/${_patSourceController.text.trim()}',
);
_managerAPI.setIntegrationsRepo(
'${_orgIntSourceController.text}/${_intSourceController.text}',
'${_orgIntSourceController.text.trim()}/${_intSourceController.text.trim()}',
);
_toast.showBottom('settingsView.restartAppForChanges');
Navigator.of(context).pop();