mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
change ffi flutter_config to flutter_option
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -64,7 +64,7 @@ class _PeerTabPageState extends State<PeerTabPage>
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
final uiType = bind.getLocalFlutterConfig(k: 'peer-card-ui-type');
|
||||
final uiType = bind.getLocalFlutterOption(k: 'peer-card-ui-type');
|
||||
if (uiType != '') {
|
||||
peerCardUiType.value = int.parse(uiType) == PeerUiType.list.index
|
||||
? PeerUiType.list
|
||||
@@ -174,7 +174,7 @@ class _PeerTabPageState extends State<PeerTabPage>
|
||||
).paddingSymmetric(horizontal: 4),
|
||||
onTap: () async {
|
||||
await handleTabSelection(t);
|
||||
await bind.setLocalFlutterConfig(
|
||||
await bind.setLocalFlutterOption(
|
||||
k: 'peer-tab-index', v: t.toString());
|
||||
},
|
||||
onHover: (value) => hover.value = value,
|
||||
@@ -244,7 +244,7 @@ class _PeerTabPageState extends State<PeerTabPage>
|
||||
onTap: () async {
|
||||
final type = types.elementAt(
|
||||
peerCardUiType.value == types.elementAt(0) ? 1 : 0);
|
||||
await bind.setLocalFlutterConfig(
|
||||
await bind.setLocalFlutterOption(
|
||||
k: 'peer-card-ui-type', v: type.index.toString());
|
||||
peerCardUiType.value = type;
|
||||
},
|
||||
@@ -561,7 +561,7 @@ class _PeerSortDropdownState extends State<PeerSortDropdown> {
|
||||
void initState() {
|
||||
if (!PeerSortType.values.contains(peerSort.value)) {
|
||||
peerSort.value = PeerSortType.remoteId;
|
||||
bind.setLocalFlutterConfig(
|
||||
bind.setLocalFlutterOption(
|
||||
k: "peer-sorting",
|
||||
v: peerSort.value,
|
||||
);
|
||||
@@ -591,7 +591,7 @@ class _PeerSortDropdownState extends State<PeerSortDropdown> {
|
||||
dense: true, (String? v) async {
|
||||
if (v != null) {
|
||||
peerSort.value = v;
|
||||
await bind.setLocalFlutterConfig(
|
||||
await bind.setLocalFlutterOption(
|
||||
k: "peer-sorting",
|
||||
v: peerSort.value,
|
||||
);
|
||||
|
||||
@@ -41,7 +41,7 @@ class LoadEvent {
|
||||
final peerSearchText = "".obs;
|
||||
|
||||
/// for peer sort, global obs value
|
||||
final peerSort = bind.getLocalFlutterConfig(k: 'peer-sorting').obs;
|
||||
final peerSort = bind.getLocalFlutterOption(k: 'peer-sorting').obs;
|
||||
|
||||
// list for listener
|
||||
final obslist = [peerSearchText, peerSort].obs;
|
||||
@@ -261,7 +261,7 @@ class _PeersViewState extends State<_PeersView> with WindowListener {
|
||||
// fallback to id sorting
|
||||
if (!PeerSortType.values.contains(sortedBy)) {
|
||||
sortedBy = PeerSortType.remoteId;
|
||||
bind.setLocalFlutterConfig(
|
||||
bind.setLocalFlutterOption(
|
||||
k: "peer-sorting",
|
||||
v: sortedBy,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user