From: Kamil Nowac Date: Thu, 29 Oct 2015 10:54:59 +0000 (+0100) Subject: Duplicated URLs in the history X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen;p=profile%2Ftv%2Fapps%2Fweb%2Fbrowser.git Duplicated URLs in the history [Issue] https://bugs.tizen.org/jira/browse/TT-236 [Problem] Duplicated records in the history [Solution] Added check if url already exist [Verification] 1. Open few tabs with the same url 2.Open History Manager There should be only one record for one URL Change-Id: I7ede53f6855245da88c3f40f0d58c9bef0471b4d --- diff --git a/services/HistoryUI/HistoryUI.cpp b/services/HistoryUI/HistoryUI.cpp index 619d4a1..697eaae 100644 --- a/services/HistoryUI/HistoryUI.cpp +++ b/services/HistoryUI/HistoryUI.cpp @@ -239,6 +239,10 @@ void HistoryUI::_clearHistory_clicked(void* data, Evas_Object*, void*) void HistoryUI::addHistoryItem(std::shared_ptr hi) { BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); + for (auto it : _history_item_data) { + if (it->item->getTitle() == hi->getTitle()) + return; + } HistoryItemData *itemData = new HistoryItemData(); itemData->item = hi; itemData->historyUI = std::shared_ptr(this);