mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
Revert "Fix/mobile connection login state"
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user