From b9b2cd586c147ba9b08bbd809e7137ba3b6dacff Mon Sep 17 00:00:00 2001 From: Renard Date: Thu, 7 Apr 2016 18:58:48 -0300 Subject: test --- .../baiparser/MainActivity.java | 49 +++------------------- 1 file changed, 5 insertions(+), 44 deletions(-) (limited to 'app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java') diff --git a/app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java b/app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java index bfe9db7..0a7d057 100644 --- a/app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java +++ b/app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java @@ -217,10 +217,8 @@ public class MainActivity extends AppCompatActivity refreshNavigator(); } - // TODO: Aplicar tema al navigator -// navigationView.setBackgroundColor(themeManager.getPrimaryDarkColor()); - // TODO: Arreglar el servidor -// checkForUpdates(); + //TODO: Aplicar tema al navigator + //navigationView.setBackgroundColor(themeManager.getPrimaryDarkColor()); } @Override @@ -293,10 +291,9 @@ public class MainActivity extends AppCompatActivity childFragment.scrollToTop(); } break; - case R.id.action_update: - Toast.makeText(getApplicationContext(), "nope", Toast.LENGTH_SHORT).show(); -// Intent updater = new Intent(getApplicationContext(), UpdaterActivity.class); -// startActivity(updater); + case R.id.action_about: + startActivity(new Intent(getApplicationContext(), LicensesActivity.class)); + break; } return super.onOptionsItemSelected(item); } @@ -441,40 +438,4 @@ public class MainActivity extends AppCompatActivity } return rnd; } - - public void checkForUpdates(){ - Ion.with(getApplicationContext()) - .load("http://ahri.xyz/bai/version.php") - .asString() - .setCallback(new FutureCallback() { - @Override - public void onCompleted(Exception e, String result) { - if (e != null){ - e.printStackTrace(); - }else{ - try { - JSONObject version = new JSONObject(result); - float lastVersion = (float) version.getDouble("version"); - if (CURRENT_VERSION == lastVersion){ - Log.v("Updater", "Up to date"); - }else{ - Log.v("Updater", "New version available : " + lastVersion); - Snackbar.make(getCurrentFocus(), "Nueva versiĆ³n disponible", Snackbar.LENGTH_LONG) - .setAction("Actualizar", new View.OnClickListener() { - @Override - public void onClick(View v) { - Intent updater = new Intent(getApplicationContext(), UpdaterActivity.class); - startActivity(updater); - } - }) - .setActionTextColor(Color.rgb(255,127,0)) - .show(); - } - } catch (JSONException e1) { - e1.printStackTrace(); - } - } - } - }); - } } -- cgit v1.2.1-18-gbd029