fix group model pull error

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2022-12-14 12:27:57 +08:00
parent 880a0d4209
commit e1bfd73ca1

View File

@ -65,7 +65,7 @@ class GroupModel {
if (json.containsKey('error')) {
throw json['error'];
} else {
total = json['total'];
if (total == 0) total = json['total'];
if (json.containsKey('data')) {
final data = json['data'];
if (data is List) {
@ -76,7 +76,7 @@ class GroupModel {
}
}
}
} while (current < total);
} while (current < total + 1);
} catch (err) {
debugPrint('$err');
userLoadError.value = err.toString();
@ -115,7 +115,7 @@ class GroupModel {
if (json.containsKey('error')) {
throw json['error'];
} else {
total = json['total'];
if (total == 0) total = json['total'];
if (json.containsKey('data')) {
final data = json['data'];
if (data is List) {
@ -128,7 +128,7 @@ class GroupModel {
}
}
}
} while (current < total);
} while (current < total + 1);
} catch (err) {
debugPrint('$err');
peerLoadError.value = err.toString();