Merge branch 'main' into implement-SailJail

pull/3/head
kirbylife 2024-03-27 05:35:26 +00:00
commit 7055b44f9b
2 changed files with 23 additions and 7 deletions

View File

@ -857,8 +857,7 @@ function createLatestDatabase( db )
"password TEXT NOT NULL, " +
"clientId TEXT NOT NULL, " +
"clientSecret TEXT NOT NULL, " +
"lastSync INTEGER DEFAULT 0," +
"fetchUnread INTEGER DEFAULT 0" +
"lastSync INTEGER DEFAULT 0" +
")"
);
@ -936,14 +935,24 @@ function _updateSchema_v3( db )
);
}
var errorFlag = false;
function _updateSchema_v4( db )
{
db.transaction(
function( tx ) {
function ( tx ) {
try {
tx.executeSql( "ALTER TABLE servers ADD COLUMN fetchUnread INTEGER DEFAULT 0" );
tx.executeSql( "UPDATE servers SET fetchUnread=0" );
} catch ( e ) {
if ( errorFlag ) throw e;
errorFlag = true;
resetDatabase();
_updateSchema_v4( db );
}
db.changeVersion( db.version, "0.4" );
}
);
}

View File

@ -21,6 +21,9 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import Sailfish.WebView 1.0
import Sailfish.WebEngine 1.0
import Sailfish.WebView.Popups 1.0
Page {
id: articlePage
@ -29,7 +32,7 @@ Page {
property string title
property string content
SilicaWebView {
WebView {
id: webview
anchors.fill: parent
@ -42,9 +45,13 @@ Page {
var html =
"<html>" +
"<head>" +
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">" +
"<style type=\"text/css\">" +
"article { font-family: sans-serif; font-size: 16px; }" +
"article h1 { font-size: 32px; }" +
"article h1 { font-size: 25px; }" +
"img { max-width: 100%; height: auto; }" +
"pre { word-wrap: normal; overflow-x: auto }" +
"code { word-wrap: normal; overflow-x: auto }" +
"</style>" +
"</head>" +
"<body>" +