From bb5d10b4622a89067c122484e4bed598b425fb88 Mon Sep 17 00:00:00 2001 From: tisfeng Date: Mon, 18 Dec 2023 21:24:03 +0800 Subject: [PATCH] perf: set max free quota to 0.9x --- Easydict/Feature/ViewController/Storage/EZLocalStorage.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Easydict/Feature/ViewController/Storage/EZLocalStorage.m b/Easydict/Feature/ViewController/Storage/EZLocalStorage.m index 4ee594236..678f1c1c9 100644 --- a/Easydict/Feature/ViewController/Storage/EZLocalStorage.m +++ b/Easydict/Feature/ViewController/Storage/EZLocalStorage.m @@ -201,7 +201,7 @@ - (BOOL)hasFreeQuotaLeft:(EZQueryService *)service { /** 例如腾讯翻译每月有500万免费字符,假如当前有1000个用户,则每人可以使用字符数为:500万/1000 = 5千 */ - CGFloat freeCount = [service totalFreeQueryCharacterCount] / kTotalUserCount; + CGFloat freeCount = [service totalFreeQueryCharacterCount] * 0.9 / kTotalUserCount; return record.queryCharacterCount < freeCount; }