Skip to content

Commit

Permalink
🔀 Merge pull request #14 from Fedodo/dev
Browse files Browse the repository at this point in the history
⚗️ Fixed type issues
  • Loading branch information
LNA-DEV authored Aug 1, 2023
2 parents e4d96af + 3d4f48c commit d275dfd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/APIs/inbox_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ class InboxAPI {
return collection;
}

Future<OrderedCollectionPage> getPosts(String nextUrl) async {
Future<OrderedCollectionPage> getPosts<T>(String nextUrl) async {
http.Response pageResponse = await AuthBaseApi.get(
url: Uri.parse(nextUrl),
);

OrderedCollectionPage collection = OrderedCollectionPage.fromJson(jsonDecode(utf8.decode(pageResponse.bodyBytes)));
OrderedCollectionPage<T> collection = OrderedCollectionPage<T>.fromJson(jsonDecode(utf8.decode(pageResponse.bodyBytes)));

return collection;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Models/ordered_collection_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ class OrderedCollectionPage<T> {
prev = json["prev"],
partOf = json["partOf"],
id = json["id"],
orderedItems = OrderedCollection.generatePosts(json["orderedItems"]);
}
orderedItems = OrderedCollection.generatePosts<T>(json["orderedItems"]);
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: activitypub
description: A library for the ActivityPub standard. Created an also used by Fedodo.
version: 1.2.5
version: 1.2.6
repository: https://github.com/Fedodo/Fedodo.Pub.ActivityPub

environment:
Expand Down

0 comments on commit d275dfd

Please sign in to comment.