Skip to content

Commit

Permalink
#2980 add: reload current note when adding browser bookmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Mar 8, 2024
1 parent e715ae4 commit 89a1f2c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
# QOwnNotes Changelog

## 24.3.1
- If the current note was the bookmarks note and a browser bookmark was added the
current note will now be reloaded (for [#2980](https://github.com/pbek/QOwnNotes/issues/2980))
- added more Dutch, Spanish translation (thank you stephanp, fitojb)

## 24.3.0
- in the `Note folder not found!` dialog, the missing note folder path will now be shown
(for [#2975](https://github.com/pbek/QOwnNotes/issues/2975))
Expand Down
8 changes: 8 additions & 0 deletions src/services/websocketserverservice.cpp
Expand Up @@ -216,6 +216,14 @@ void WebSocketServerService::processMessage(const QString &message) {

pSender->sendTextMessage(
flashMessageJsonText(tr("%n bookmark(s) created", "", bookmarkList.count())));

// Reload current note if the bookmark was deleted from the current note
MainWindow *mainWindow = MainWindow::instance();
if (mainWindow != nullptr) {
if (getBookmarksNoteName() == mainWindow->getCurrentNote().getName()) {
mainWindow->reloadCurrentNoteByNoteId(true);
}
}
} else if (type == QLatin1String("switchNoteFolder")) {
#ifndef INTEGRATION_TESTS
MainWindow *mainWindow = MainWindow::instance();
Expand Down

0 comments on commit 89a1f2c

Please sign in to comment.