From f4be0fa596facae312f929b3167f4996c9412652 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Thu, 10 Jan 2019 14:20:31 -0600 Subject: [PATCH] Add a public method to obtain the currently selected node: getSelectedNode() --- .../cy/agorise/graphenej/api/android/NetworkService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/graphenej/src/main/java/cy/agorise/graphenej/api/android/NetworkService.java b/graphenej/src/main/java/cy/agorise/graphenej/api/android/NetworkService.java index c455688..0dfc24f 100644 --- a/graphenej/src/main/java/cy/agorise/graphenej/api/android/NetworkService.java +++ b/graphenej/src/main/java/cy/agorise/graphenej/api/android/NetworkService.java @@ -776,6 +776,12 @@ public class NetworkService extends Service { return nodeProvider.getSortedNodes(); } + + /** + * Returns the currently selected node + */ + public FullNode getSelectedNode() { return mSelectedNode; } + /** * Returns an observable that will notify its observers about node latency updates. * @return Observer of {@link FullNode} instances.