From b92d71d79bb34a553ad746493634953b6c968978 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 14 Nov 2022 23:13:56 +0100 Subject: [PATCH] Fix likes --- Model/HistoryModel.swift | 9 --------- Model/Video.swift | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Model/HistoryModel.swift b/Model/HistoryModel.swift index a12a2bfa..a2365091 100644 --- a/Model/HistoryModel.swift +++ b/Model/HistoryModel.swift @@ -19,15 +19,6 @@ extension PlayerModel { return } - if historyItemBeingLoaded == nil { - logger.info("loading history details: \(id)") - historyItemBeingLoaded = id - } else { - logger.info("POSTPONING history load: \(id)") - historyItemsToLoad.append(id) - return - } - playerAPI.video(id) .load() .onSuccess { [weak self] response in diff --git a/Model/Video.swift b/Model/Video.swift index b3c27c2f..522735f7 100644 --- a/Model/Video.swift +++ b/Model/Video.swift @@ -126,11 +126,11 @@ struct Video: Identifiable, Equatable, Hashable { } var likesCount: String? { - guard (likes ?? 0) > 0 else { + guard let likes else { return nil } - return likes?.formattedAsAbbreviation() + return likes.formattedAsAbbreviation() } var dislikesCount: String? {