|
@@ -19,15 +19,15 @@ class ApiService {
|
|
|
var url = Uri.http('127.0.0.1:3001', 'sorted_threads_by_date', {
|
|
|
'folder': folder,
|
|
|
'limit': '20',
|
|
|
- 'offset': pagenitaion,
|
|
|
+ 'offset': pagenitaion.toString(),
|
|
|
});
|
|
|
var response = await http.get(url);
|
|
|
- print(response);
|
|
|
+ // print(response);
|
|
|
List<GetThreadResponse> allEmails = [];
|
|
|
|
|
|
if (response.statusCode == 200) {
|
|
|
List json = jsonDecode(response.body);
|
|
|
- for (var item in json.take(1)) {
|
|
|
+ for (var item in json) {
|
|
|
//each item in the json is a date
|
|
|
if (item.length > 1 && item[0] is String && item[1] is List) {
|
|
|
List<int> threadIDs = List<int>.from(item[1]);
|