mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 02:16:00 +02:00
refact: init values from initState to Constractor (#8817)
* refact: init values from initState to Constractor Signed-off-by: dignow <linlong1265@gmail.com> * fix: move RxBool init into Constructor Signed-off-by: dignow <linlong1265@gmail.com> * peer sort option Signed-off-by: dignow <linlong1265@gmail.com> * Remove empty initState() Signed-off-by: dignow <linlong1265@gmail.com> --------- Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
2aef79688b
commit
b967d496cc
24 changed files with 120 additions and 174 deletions
|
@ -31,7 +31,6 @@ import 'mobile/pages/file_manager_page.dart';
|
|||
import 'mobile/pages/remote_page.dart';
|
||||
import 'desktop/pages/remote_page.dart' as desktop_remote;
|
||||
import 'package:flutter_hbb/desktop/widgets/remote_toolbar.dart';
|
||||
import 'models/input_model.dart';
|
||||
import 'models/model.dart';
|
||||
import 'models/platform_model.dart';
|
||||
|
||||
|
@ -3448,7 +3447,12 @@ setResizable(bool resizable) {
|
|||
|
||||
isOptionFixed(String key) => bind.mainIsOptionFixed(key: key);
|
||||
|
||||
final isCustomClient = bind.isCustomClient();
|
||||
bool? _isCustomClient;
|
||||
bool get isCustomClient {
|
||||
_isCustomClient ??= bind.isCustomClient();
|
||||
return _isCustomClient!;
|
||||
}
|
||||
|
||||
get defaultOptionLang => isCustomClient ? 'default' : '';
|
||||
get defaultOptionTheme => isCustomClient ? 'system' : '';
|
||||
get defaultOptionYes => isCustomClient ? 'Y' : '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue