mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
opt pull ab (#7508)
1. Test legacy/new mode only upon logging out. 2. Avoid pulling all data unnecessarily: * On startup: Retrieve list, current, and personal data. * On refresh: Retrieve list and current data. * On changing AB/switching tabs: Attempt to pull current data if not initialized. 3. Cache only personal and current AB. 4. Synchronize current AB from recent. 5. Remove AB loading CircularProgressIndicator. Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import 'dart:convert';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hbb/common/hbbs/hbbs.dart';
|
||||
import 'package:flutter_hbb/models/ab_model.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
@@ -102,7 +103,10 @@ class UserModel {
|
||||
|
||||
// update ab and group status
|
||||
static Future<void> updateOtherModels() async {
|
||||
await Future.wait([gFFI.abModel.pullAb(), gFFI.groupModel.pull()]);
|
||||
await Future.wait([
|
||||
gFFI.abModel.pullAb(force: ForcePullAb.listAndCurrent, quiet: false),
|
||||
gFFI.groupModel.pull()
|
||||
]);
|
||||
}
|
||||
|
||||
Future<void> logOut({String? apiServer}) async {
|
||||
|
||||
Reference in New Issue
Block a user