trying to achieve correct display update on page content update – I have a feeling that this still doesn`t work reliably
All checks were successful
Build Docker Image / Docker-Build (push) Successful in 4m48s
Build Docker Image / Clean-Registry (push) Successful in 21s

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-01-10 15:25:16 +01:00
parent 1187956625
commit 43ebb241e8
3 changed files with 11 additions and 9 deletions

View File

@@ -268,8 +268,10 @@ public class SqliteDb extends BaseDb implements WikiDb {
@Override
public WikiPage save(WikiPage page) {
try {
if (page.isDirty(CONTENT) || page.isDirty(ID) || page.isDirty(TITLE)) insertInto(TABLE_PAGES,ID,VERSION,TITLE,CONTENT)
.values(page.id(),page.version(),page.title(),page.content()).execute(db).close();
if (page.isDirty(CONTENT) || page.isDirty(ID) || page.isDirty(TITLE)) {
insertInto(TABLE_PAGES,ID,VERSION,TITLE,CONTENT).values(page.id(),page.version(),page.title(),page.content()).execute(db).close();
page.versions().add(page.version());
}
if (page.isDirty(MEMBERS)){
Query.delete().from(TABLE_PAGES_USERS).where(PAGE_ID, equal(page.id())).where(USER_ID,Condition.notIn(page.members().keySet().toArray())).execute(db);
var query = replaceInto(TABLE_PAGES_USERS,PAGE_ID,USER_ID,PERMISSIONS);