Revert "Fix/mobile connection login state"

This commit is contained in:
RustDesk
2023-06-23 18:25:42 +08:00
committed by GitHub
parent 74dc8536be
commit e30f09e7f7
13 changed files with 122 additions and 170 deletions

View File

@@ -15,8 +15,7 @@ import '../common/formatter/id_formatter.dart';
import '../desktop/pages/server_page.dart' as desktop;
import '../desktop/widgets/tabbar_widget.dart';
import '../mobile/pages/server_page.dart';
import './model.dart';
import './state_model.dart';
import 'model.dart';
const kLoginDialogTag = "LOGIN";
@@ -32,6 +31,7 @@ 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,6 +61,8 @@ class ServerModel with ChangeNotifier {
bool get hideCm => _hideCm;
int get connectStatus => _connectStatus;
String get verificationMethod {
final index = [
kUseTemporaryPassword,
@@ -118,7 +120,15 @@ class ServerModel with ChangeNotifier {
_serverId = IDTextEditingController(text: _emptyIdShow);
timerCallback() async {
stateGlobal.updateSvcStatus();
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) {