use of im.actor.core.entity.MessageSearchEntity in project actor-platform by actorapp.
the class JsFacade method findAllPhotos.
@UsedByApp
public JsPromise findAllPhotos(final JsPeer peer) {
return JsPromise.create(new JsPromiseExecutor() {
@Override
public void execute() {
messenger.findAllPhotos(peer.convert()).start(new CommandCallback<List<MessageSearchEntity>>() {
@Override
public void onResult(List<MessageSearchEntity> res) {
resolve(convertSearchRes(res));
}
@Override
public void onError(Exception e) {
Log.d(TAG, "findAllText:error");
reject(e.getMessage());
}
});
}
});
}
use of im.actor.core.entity.MessageSearchEntity in project actor-platform by actorapp.
the class JsFacade method findAllText.
@UsedByApp
public JsPromise findAllText(final JsPeer peer, final String query) {
return JsPromise.create(new JsPromiseExecutor() {
@Override
public void execute() {
messenger.findTextMessages(peer.convert(), query).start(new CommandCallback<List<MessageSearchEntity>>() {
@Override
public void onResult(List<MessageSearchEntity> res) {
resolve(convertSearchRes(res));
}
@Override
public void onError(Exception e) {
Log.d(TAG, "findAllText:error");
reject(e.getMessage());
}
});
}
});
}
use of im.actor.core.entity.MessageSearchEntity in project actor-platform by actorapp.
the class JsFacade method findAllLinks.
@UsedByApp
public JsPromise findAllLinks(final JsPeer peer) {
return JsPromise.create(new JsPromiseExecutor() {
@Override
public void execute() {
messenger.findAllLinks(peer.convert()).start(new CommandCallback<List<MessageSearchEntity>>() {
@Override
public void onResult(List<MessageSearchEntity> res) {
resolve(convertSearchRes(res));
}
@Override
public void onError(Exception e) {
Log.d(TAG, "findAllText:error");
reject(e.getMessage());
}
});
}
});
}
use of im.actor.core.entity.MessageSearchEntity in project actor-platform by actorapp.
the class JsFacade method findAllDocs.
@UsedByApp
public JsPromise findAllDocs(final JsPeer peer) {
return JsPromise.create(new JsPromiseExecutor() {
@Override
public void execute() {
messenger.findAllDocs(peer.convert()).start(new CommandCallback<List<MessageSearchEntity>>() {
@Override
public void onResult(List<MessageSearchEntity> res) {
resolve(convertSearchRes(res));
}
@Override
public void onError(Exception e) {
Log.d(TAG, "findAllText:error");
reject(e.getMessage());
}
});
}
});
}
Aggregations