From f4136d03bad16d2afaea1dfb356afd371af22368 Mon Sep 17 00:00:00 2001 From: CMK Date: Thu, 11 Mar 2021 11:43:49 +0800 Subject: [PATCH] fix: add missing fetchLimit --- Mastodon/Service/APIService/APIService+Favorite.swift | 1 + Mastodon/Service/APIService/APIService+Reblog.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Mastodon/Service/APIService/APIService+Favorite.swift b/Mastodon/Service/APIService/APIService+Favorite.swift index 98b00cf18..2577b6cb0 100644 --- a/Mastodon/Service/APIService/APIService+Favorite.swift +++ b/Mastodon/Service/APIService/APIService+Favorite.swift @@ -79,6 +79,7 @@ extension APIService { let _oldToot: Toot? = { let request = Toot.sortedFetchRequest request.predicate = Toot.predicate(domain: mastodonAuthenticationBox.domain, id: statusID) + request.fetchLimit = 1 request.returnsObjectsAsFaults = false request.relationshipKeyPathsForPrefetching = [#keyPath(Toot.reblog)] do { diff --git a/Mastodon/Service/APIService/APIService+Reblog.swift b/Mastodon/Service/APIService/APIService+Reblog.swift index 55b4699ae..5525fe5bf 100644 --- a/Mastodon/Service/APIService/APIService+Reblog.swift +++ b/Mastodon/Service/APIService/APIService+Reblog.swift @@ -85,6 +85,7 @@ extension APIService { let _oldToot: Toot? = { let request = Toot.sortedFetchRequest request.predicate = Toot.predicate(domain: domain, id: statusID) + request.fetchLimit = 1 request.returnsObjectsAsFaults = false request.relationshipKeyPathsForPrefetching = [#keyPath(Toot.reblog)] do {