mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 08:30:29 +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 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: [
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
@@ -705,6 +718,7 @@ class SettingView extends GetView<SettingController> {
|
||||
labelText: 'password'.tr,
|
||||
contentPadding: const EdgeInsets.all(0.0),
|
||||
),
|
||||
obscureText: true,
|
||||
),
|
||||
),
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user