Skip to content

Commit

Permalink
Reset the location of a tab if the second Bible translation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-klein committed Dec 22, 2024
1 parent ad0d008 commit eeebe4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/frontend/controllers/tab_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,12 @@ class TabController {

if (currentTab.getTextType() == 'search_results') {
if (!isSecondBible) {
// Repeat the search with the new translation
await app_controller.text_controller.prepareForNewText(true, true);
app_controller.module_search_controller.startSearch(null, this.getSelectedTabIndex(), currentTab.getSearchTerm());
} else {
// We need to re-render the search results with the change of the second translation
currentTab.setLocation(null);
await app_controller.module_search_controller.reRenderCurrentSearchResults();
}
} else {
Expand Down

0 comments on commit eeebe4c

Please sign in to comment.