mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 13:53:41 +00:00
fix: proxy username and password not persisting in settings (#1183)
This commit is contained in:
1 parent
f7189668fd
commit
5bb8541385
1 file changed
+14
@@ -687,6 +687,19 @@ class SettingView extends GetView<SettingController> {
|
|||||||
final usrController = TextEditingController(text: proxy.usr);
|
final usrController = TextEditingController(text: proxy.usr);
|
||||||
final pwdController = TextEditingController(text: proxy.pwd);
|
final pwdController = TextEditingController(text: proxy.pwd);
|
||||||
|
|
||||||
|
updateAuth() async {
|
||||||
|
if (usrController.text != proxy.usr ||
|
||||||
|
pwdController.text != proxy.pwd) {
|
||||||
|
proxy.usr = usrController.text;
|
||||||
|
proxy.pwd = pwdController.text;
|
||||||
|
|
||||||
|
await debounceSave();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
usrController.addListener(updateAuth);
|
||||||
|
pwdController.addListener(updateAuth);
|
||||||
|
|
||||||
final auth = Row(children: [
|
final auth = Row(children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
@@ -705,6 +718,7 @@ class SettingView extends GetView<SettingController> {
|
|||||||
labelText: 'password'.tr,
|
labelText: 'password'.tr,
|
||||||
contentPadding: const EdgeInsets.all(0.0),
|
contentPadding: const EdgeInsets.all(0.0),
|
||||||
),
|
),
|
||||||
|
obscureText: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in new issue
Block a user