From cf8f4a6680e6925e961b8a203297a38cfe9ef4cd Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Fri, 13 Dec 2019 19:59:01 +0100 Subject: [PATCH] Fix multiple favourites --- qml/harbour-seaprint.qml | 4 +++- translations/harbour-seaprint-de.ts | 2 +- translations/harbour-seaprint.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/qml/harbour-seaprint.qml b/qml/harbour-seaprint.qml index 2b6acc8..7cdb91a 100644 --- a/qml/harbour-seaprint.qml +++ b/qml/harbour-seaprint.qml @@ -23,8 +23,10 @@ ApplicationWindow } function addFavourite(ssid, url) { + if(isFavourite(ssid, url)) + return; db_conn.transaction(function (tx) { - tx.executeSql('REPLACE INTO Favourites VALUES(?, ?)', [ssid, url] ); + tx.executeSql('INSERT INTO Favourites VALUES(?, ?)', [ssid, url] ); }); } diff --git a/translations/harbour-seaprint-de.ts b/translations/harbour-seaprint-de.ts index 48f506c..c438ca4 100644 --- a/translations/harbour-seaprint-de.ts +++ b/translations/harbour-seaprint-de.ts @@ -70,7 +70,7 @@ CoverPage - Seaprint + SeaPrint diff --git a/translations/harbour-seaprint.ts b/translations/harbour-seaprint.ts index 48f506c..c438ca4 100644 --- a/translations/harbour-seaprint.ts +++ b/translations/harbour-seaprint.ts @@ -70,7 +70,7 @@ CoverPage - Seaprint + SeaPrint