fix group model pull error
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
880a0d4209
commit
e1bfd73ca1
@ -65,7 +65,7 @@ class GroupModel {
|
|||||||
if (json.containsKey('error')) {
|
if (json.containsKey('error')) {
|
||||||
throw json['error'];
|
throw json['error'];
|
||||||
} else {
|
} else {
|
||||||
total = json['total'];
|
if (total == 0) total = json['total'];
|
||||||
if (json.containsKey('data')) {
|
if (json.containsKey('data')) {
|
||||||
final data = json['data'];
|
final data = json['data'];
|
||||||
if (data is List) {
|
if (data is List) {
|
||||||
@ -76,7 +76,7 @@ class GroupModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (current < total);
|
} while (current < total + 1);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
debugPrint('$err');
|
debugPrint('$err');
|
||||||
userLoadError.value = err.toString();
|
userLoadError.value = err.toString();
|
||||||
@ -115,7 +115,7 @@ class GroupModel {
|
|||||||
if (json.containsKey('error')) {
|
if (json.containsKey('error')) {
|
||||||
throw json['error'];
|
throw json['error'];
|
||||||
} else {
|
} else {
|
||||||
total = json['total'];
|
if (total == 0) total = json['total'];
|
||||||
if (json.containsKey('data')) {
|
if (json.containsKey('data')) {
|
||||||
final data = json['data'];
|
final data = json['data'];
|
||||||
if (data is List) {
|
if (data is List) {
|
||||||
@ -128,7 +128,7 @@ class GroupModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (current < total);
|
} while (current < total + 1);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
debugPrint('$err');
|
debugPrint('$err');
|
||||||
peerLoadError.value = err.toString();
|
peerLoadError.value = err.toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user