From 2e68aa900bc93e22515a541a2dbdf4470a70aad4 Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Fri, 17 Jan 2014 14:57:47 +0000
Subject: [PATCH] Change to RI tab when viewing RI from LS

---
 src/net/i2p/android/router/netdb/NetDbActivity.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/net/i2p/android/router/netdb/NetDbActivity.java b/src/net/i2p/android/router/netdb/NetDbActivity.java
index e7c7d1be8..2edde5fba 100644
--- a/src/net/i2p/android/router/netdb/NetDbActivity.java
+++ b/src/net/i2p/android/router/netdb/NetDbActivity.java
@@ -116,6 +116,11 @@ public class NetDbActivity extends I2PActivityBase implements
                     isRouterInfo, entryHash);
             getSupportFragmentManager().beginTransaction()
                 .replace(R.id.detail_fragment, detailFrag).commit();
+
+            // If we are coming from a LS to a RI, change the tab
+            int currentTab = getSupportActionBar().getSelectedNavigationIndex();
+            if (isRouterInfo && currentTab !=1)
+                getSupportActionBar().setSelectedNavigationItem(1);
         } else {
             // In single-pane mode, simply start the detail activity
             // for the selected item ID.
-- 
GitLab