Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -865,14 +865,15 @@ private void search(@NonNull final String theSearchString,
hideKeyboardSearch();

// store search query if search history is enabled
disposables.add(historyRecordManager.onSearched(serviceId, theSearchString)

historyRecordManager.onSearched(serviceId, theSearchString)
.observeOn(AndroidSchedulers.mainThread())
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I should change it to shedulers io?

.subscribe(
ignored -> {
},
throwable -> showSnackBarError(new ErrorInfo(throwable, UserAction.SEARCHED,
Copy link
Copy Markdown
Author

@ghost ghost Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still not sure it is safe because of call to showSnackBarError. The same thing is with delete history item operations in the file...

Please help to answer following questions:

  1. Is current approach of this PR safe?
  2. If not safe maybe I should create separate composite disposable specifically for db these db related tasks?
    2.1. ...And then rename disposables variable as would be used for only one purpose a bit above this code (checking if search is url which can be opened in newpipe directly...)

I am almost sure 2 + 2.1 is the best way to go but Idk

theSearchString, serviceId))
));
);

// load search results
suggestionPublisher.onNext(theSearchString);
Expand Down