From 9595df19a852f475c0b499bc989a24767a8e196f Mon Sep 17 00:00:00 2001 From: Yaroslav Dmytrotsa Date: Tue, 11 Aug 2015 09:56:36 +0300 Subject: [PATCH] clean up "frozen" accounts and dapps. --- .../java/io/syng/activity/BaseActivity.java | 7 ++----- .../java/io/syng/activity/MainActivity.java | 21 +++++++------------ 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/io/syng/activity/BaseActivity.java b/app/src/main/java/io/syng/activity/BaseActivity.java index ef7a1d4..8ef8db3 100644 --- a/app/src/main/java/io/syng/activity/BaseActivity.java +++ b/app/src/main/java/io/syng/activity/BaseActivity.java @@ -64,12 +64,9 @@ public abstract class BaseActivity extends AppCompatActivity implements private static final String CONTRIBUTE_LINK = "https://github.com/syng-io"; private static final String CONTINUE_SEARCH_LINK = "dapp://syng.io/store?q=search%20query"; - private ArrayList mDAppNamesList = new ArrayList<>(Arrays.asList("Console", "DApps", - "EtherEx", "TrustDavis", "Augur", "Console", "DApps", - "EtherEx", "TrustDavis")); + private ArrayList mDAppNamesList = new ArrayList<>(Arrays.asList("Console")); - private ArrayList mAccountNamesList = new ArrayList<>(Arrays.asList("Cow", "Yaroslav", "Frank Underwood", - "Jarradh", "Adrian")); + private ArrayList mAccountNamesList = new ArrayList<>(Arrays.asList("Cow")); private ActionBarDrawerToggle mDrawerToggle; diff --git a/app/src/main/java/io/syng/activity/MainActivity.java b/app/src/main/java/io/syng/activity/MainActivity.java index 06bd9f4..8cfacd6 100644 --- a/app/src/main/java/io/syng/activity/MainActivity.java +++ b/app/src/main/java/io/syng/activity/MainActivity.java @@ -35,21 +35,16 @@ public class MainActivity extends BaseActivity { @Override protected void onDAppClick(Dapp dapp) { - switch (dapp.getName()) { - case "Console": + switch (dapp.getUrl()) { + case "": replaceFragment(new ConsoleFragment()); break; - case "DApps": - replaceFragment(new WebViewFragment()); - break; - case "EtherEx": - replaceFragment(new WebViewFragment()); - break; - case "TrustDavis": - replaceFragment(new WebViewFragment()); - break; - case "Augur": - replaceFragment(new WebViewFragment()); + default: + WebViewFragment wvF = new WebViewFragment(); + Bundle args = new Bundle(); + args.putString("url", dapp.getUrl()); + wvF.setArguments(args); + replaceFragment(wvF); break; } }