visual fix
This commit is contained in:
20 files changed
+669
-32
No files matched your search
@@ -16,6 +16,7 @@ BookPosition BookPositionStore::load(const QByteArray &contentMd5)
|
||||
pos.progress = d.value(QStringLiteral("progress"), 0.0).toReal();
|
||||
pos.pageShift = d.value(QStringLiteral("pageShift"), true).toBool();
|
||||
pos.mangaRTL = d.value(QStringLiteral("mangaRTL"), true).toBool();
|
||||
pos.useBookColours = d.value(QStringLiteral("useBookColours"), false).toBool();
|
||||
return pos;
|
||||
}
|
||||
|
||||
@@ -29,9 +30,19 @@ void BookPositionStore::save(const QByteArray &contentMd5, const BookPosition &p
|
||||
{QStringLiteral("progress"), pos.progress},
|
||||
{QStringLiteral("pageShift"), pos.pageShift},
|
||||
{QStringLiteral("mangaRTL"), pos.mangaRTL},
|
||||
{QStringLiteral("useBookColours"), pos.useBookColours},
|
||||
});
|
||||
}
|
||||
|
||||
void BookPositionStore::setUseBookColours(const QByteArray &contentMd5, bool enabled)
|
||||
{
|
||||
if (contentMd5.isEmpty())
|
||||
return;
|
||||
BookPosition pos = load(contentMd5);
|
||||
pos.useBookColours = enabled;
|
||||
save(contentMd5, pos);
|
||||
}
|
||||
|
||||
QString BookPositionStore::sectionKey(const QByteArray &contentMd5)
|
||||
{
|
||||
return QStringLiteral("saved-progress/") + QString::fromLatin1(contentMd5.toHex());
|
||||
|
||||
Reference in new issue
Block a user