Updated to use newer LibAC instruction to reconnect or disconnect
This commit is contained in:
parent
a393aadada
commit
2ae933b9ad
3 changed files with 7 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -51,4 +51,5 @@ build
|
|||
|
||||
*.g.dart
|
||||
|
||||
out
|
||||
out
|
||||
RELEASE
|
|
@ -60,14 +60,14 @@ class ServerPage extends StatelessWidget {
|
|||
login.username = username.text;
|
||||
login.password = password.text;
|
||||
|
||||
S2CResponse response = await settings.client!.send(login);
|
||||
S2CResponse response = await settings.client!.send(login, true);
|
||||
S2CLoginReply loginResponse = S2CLoginReply();
|
||||
loginResponse.decodeTag(response.contents);
|
||||
loginResponse.handleClientPacket();
|
||||
|
||||
if (loginResponse.valid) {
|
||||
S2CResponse settingsData =
|
||||
await settings.client!.send(C2SRequestSettingsPacket());
|
||||
await settings.client!.send(C2SRequestSettingsPacket(), true);
|
||||
C2SRequestSettingsPacket settingsBack =
|
||||
C2SRequestSettingsPacket();
|
||||
settingsBack.decodeTag(settingsData.contents);
|
||||
|
|
|
@ -113,7 +113,9 @@ class HomePageState extends State<HomePage> {
|
|||
C2SUploadSettingsPacket upload = C2SUploadSettingsPacket();
|
||||
upload.srvSettings = settings.serialize();
|
||||
|
||||
settings.client!.send(upload);
|
||||
settings.client!.send(upload, false);
|
||||
|
||||
Navigator.pop(context);
|
||||
},
|
||||
)
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue