From ecaeb2a534e85ed0475ed0e8dccf922b7f3db576 Mon Sep 17 00:00:00 2001 From: Dennis Yurasov Date: Wed, 20 Dec 2023 16:11:56 +0300 Subject: [PATCH] dialog: fixed saving dialogs on shutdown that are already loaded at startup when using db_mode 3 - The dialogs that loaded at startup are not saved in DB on shutdown, and so not loaded at restart, fixes issue #3669 --- src/modules/dialog/dlg_db_handler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/dialog/dlg_db_handler.c b/src/modules/dialog/dlg_db_handler.c index ecfd872504f..b6fe1afda6f 100644 --- a/src/modules/dialog/dlg_db_handler.c +++ b/src/modules/dialog/dlg_db_handler.c @@ -509,6 +509,9 @@ int load_dialog_info_from_db( get_ticks()); dlg->dflags = 0; + if(mode == 0 && dlg_db_mode == DB_MODE_SHUTDOWN) { + dlg->dflags |= DLG_FLAG_NEW; + } if(mode != 0) { if(loaded_extra < DLG_MAX_DB_LOAD_EXTRA) {