summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-07-10 21:51:18 +0400
committerAndrew Dolgov <[email protected]>2012-07-10 21:51:18 +0400
commite68c90cbceab13193597f203ad9f15a6d919af14 (patch)
tree279eccd0037e9f2f2ddae5e413e921977be96163 /src
parent9341df4c2191e83cb60beed38935d881b9ff4b04 (diff)
prevent trying to login twice on startup
open idiot-friendly dialog when application is not configured bump version
Diffstat (limited to 'src')
-rw-r--r--src/org/fox/ttrss/MainActivity.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java
index bc9883c4..c3a7ea21 100644
--- a/src/org/fox/ttrss/MainActivity.java
+++ b/src/org/fox/ttrss/MainActivity.java
@@ -709,7 +709,7 @@ public class MainActivity extends CommonActivity implements OnlineServices {
if (m_sessionId != null) {
loginSuccess();
} else {
- login();
+ //login(); -- handled in onResume()
}
}
}
@@ -1957,11 +1957,26 @@ public class MainActivity extends CommonActivity implements OnlineServices {
setLoadingStatus(R.string.login_need_configure, false);
- // launch preferences
- Intent intent = new Intent(MainActivity.this,
- PreferencesActivity.class);
- startActivityForResult(intent, 0);
-
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setMessage(R.string.dialog_need_configure_prompt)
+ .setCancelable(false)
+ .setPositiveButton(R.string.dialog_open_preferences, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ // launch preferences
+
+ Intent intent = new Intent(MainActivity.this,
+ PreferencesActivity.class);
+ startActivityForResult(intent, 0);
+ }
+ })
+ .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ dialog.cancel();
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+
} else {
LoginRequest ar = new LoginRequest(getApplicationContext());