From 0fc7985e48ac9cce3e142d613d22f108bce38330 Mon Sep 17 00:00:00 2001 From: problematicconsumer Date: Fri, 12 Jan 2024 23:00:08 +0330 Subject: [PATCH] Fix infinite sub traffic --- lib/features/profile/data/profile_parser.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/features/profile/data/profile_parser.dart b/lib/features/profile/data/profile_parser.dart index 5496658b..c482ae2c 100644 --- a/lib/features/profile/data/profile_parser.dart +++ b/lib/features/profile/data/profile_parser.dart @@ -88,13 +88,14 @@ abstract class ProfileParser { case { "upload": final upload?, "download": final download?, - "total": final total, + "total": var total, "expire": final expire }) { + total = total ?? 0; return SubscriptionInfo( upload: upload, download: download, - total: total ?? 9223372036854775807, + total: total == 0 ? 9223372036854775807 : total, expire: DateTime.fromMillisecondsSinceEpoch( (expire ?? 92233720368) * 1000, ),