diff --git a/example/java/org/drinkless/tdlib/Client.java b/example/java/org/drinkless/tdlib/Client.java index dc5a4bfb0..9050e467b 100644 --- a/example/java/org/drinkless/tdlib/Client.java +++ b/example/java/org/drinkless/tdlib/Client.java @@ -103,28 +103,6 @@ public final class Client implements Runnable { return nativeClientExecute(query); } - /** - * Replaces handler for incoming updates from the TDLib. - * - * @param updateHandler Handler with onResult method which will be called for every incoming - * update from the TDLib. - * @param exceptionHandler Exception handler with onException method which will be called on - * exception thrown from updateHandler, if it is null, defaultExceptionHandler will be invoked. - */ - public void setUpdateHandler(ResultHandler updateHandler, ExceptionHandler exceptionHandler) { - updateHandlers.put(nativeClientId, new Handler(updateHandler, exceptionHandler)); - } - - /** - * Replaces handler for incoming updates from the TDLib. Sets empty ExceptionHandler. - * - * @param updateHandler Handler with onResult method which will be called for every incoming - * update from the TDLib. - */ - public void setUpdateHandler(ResultHandler updateHandler) { - setUpdateHandler(updateHandler, null); - } - /** * Replaces default exception handler to be invoked on exceptions thrown from updateHandler and all other ResultHandler. * diff --git a/td/telegram/ClientDotNet.cpp b/td/telegram/ClientDotNet.cpp index 98d35aeeb..4d5cf4612 100644 --- a/td/telegram/ClientDotNet.cpp +++ b/td/telegram/ClientDotNet.cpp @@ -76,14 +76,6 @@ public: return Api::FromUnmanaged(*td::Client::execute(std::move(request)).object); } - /// - /// Replaces handler for incoming updates from the TDLib. - /// - /// Handler with OnResult method which will be called for every incoming update from the TDLib. - void SetUpdateHandler(ClientResultHandler^ updateHandler) { - handlers[0] = updateHandler; - } - /// /// Launches a cycle which will fetch all results of queries to TDLib and incoming updates from TDLib. /// Must be called once on a separate dedicated thread, on which all updates and query results will be handled.