Adding contacts technical aspects
* Contact SearchResult from server is now getting processed and correctly displayed. * Sending a AddContact event to server, if button is pressed. * Added several interface objects
This commit is contained in:
@@ -11,11 +11,10 @@ import javax.naming.TimeLimitExceededException;
|
||||
|
||||
import envoy.client.Config;
|
||||
import envoy.client.data.LocalDb;
|
||||
import envoy.client.event.SearchResultEvent;
|
||||
import envoy.client.util.EnvoyLog;
|
||||
import envoy.data.*;
|
||||
import envoy.event.Event;
|
||||
import envoy.event.IdGeneratorRequest;
|
||||
import envoy.event.MessageStatusChangeEvent;
|
||||
import envoy.event.*;
|
||||
import envoy.util.SerializationUtils;
|
||||
|
||||
/**
|
||||
@@ -111,6 +110,9 @@ public class Client implements Closeable {
|
||||
// Process message ID generation
|
||||
receiver.registerProcessor(IdGenerator.class, localDb::setIdGenerator);
|
||||
|
||||
// Process contact searches
|
||||
receiver.registerProcessor(Contacts.class, contacts -> EventBus.getInstance().dispatch(new SearchResultEvent(contacts.getContacts())));
|
||||
|
||||
// Request a generator if none is present or the existing one is consumed
|
||||
if (!localDb.hasIdGenerator() || !localDb.getIdGenerator().hasNext()) requestIdGenerator();
|
||||
|
||||
|
Reference in New Issue
Block a user