SPARK-2343 Show error "Contact search service is not available" if no any search service provided

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
This commit is contained in:
Sergey Ponomarev 2024-08-26 15:53:04 +03:00
parent 960936020e
commit 9c46ea6b64
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ public class UserSearchService implements Searchable {
private void processQuery(String query) {
UIManager.put("OptionPane.okButtonText", Res.getString("ok"));
if (searchServices == null) {
if (searchServices == null || searchServices.isEmpty()) {
JOptionPane.showMessageDialog(SparkManager.getMainWindow(), Res.getString("message.search.service.not.available"), Res.getString("title.error"), JOptionPane.ERROR_MESSAGE);
return;
}

View File

@ -653,7 +653,7 @@ message.save.profile = To save changes to your profile, click save
message.search.for.contacts = Search for contacts
message.search.input.short = Please provide at least two letters.
message.search.for.other.people = Search for other people on the server
message.search.service.not.available = Unable to contact search service
message.search.service.not.available = Contact search service is not available
message.searching.please.wait = Searching, please wait...
message.select.add.room.to.add = Please select a room to add to your service list
message.select.one.or.more = Select one or more users in your roster