refact, mobile, connection state

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-06-23 13:09:22 +08:00
parent 71db0e99b5
commit 811293b261
3 changed files with 24 additions and 38 deletions

View File

@@ -31,7 +31,6 @@ class ServerModel with ChangeNotifier {
bool _fileOk = false;
bool _showElevation = false;
bool _hideCm = false;
int _connectStatus = 0; // Rendezvous Server status
String _verificationMethod = "";
String _temporaryPasswordLength = "";
String _approveMode = "";
@@ -61,8 +60,6 @@ class ServerModel with ChangeNotifier {
bool get hideCm => _hideCm;
int get connectStatus => _connectStatus;
String get verificationMethod {
final index = [
kUseTemporaryPassword,
@@ -120,15 +117,6 @@ class ServerModel with ChangeNotifier {
_serverId = IDTextEditingController(text: _emptyIdShow);
timerCallback() async {
var status = await bind.mainGetOnlineStatue();
if (status > 0) {
status = 1;
}
if (status != _connectStatus) {
_connectStatus = status;
notifyListeners();
}
if (desktopType == DesktopType.cm) {
final res = await bind.cmCheckClientsLength(length: _clients.length);
if (res != null) {