Fix multiple favourites

This commit is contained in:
Anton Thomasson 2019-12-13 19:59:01 +01:00
parent 41f07acc10
commit cf8f4a6680
3 changed files with 5 additions and 3 deletions

View file

@ -23,8 +23,10 @@ ApplicationWindow
} }
function addFavourite(ssid, url) { function addFavourite(ssid, url) {
if(isFavourite(ssid, url))
return;
db_conn.transaction(function (tx) { db_conn.transaction(function (tx) {
tx.executeSql('REPLACE INTO Favourites VALUES(?, ?)', [ssid, url] ); tx.executeSql('INSERT INTO Favourites VALUES(?, ?)', [ssid, url] );
}); });
} }

View file

@ -70,7 +70,7 @@
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message> <message>
<source>Seaprint</source> <source>SeaPrint</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -70,7 +70,7 @@
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message> <message>
<source>Seaprint</source> <source>SeaPrint</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>