summaryrefslogtreecommitdiff
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
parent9341df4c2191e83cb60beed38935d881b9ff4b04 (diff)
prevent trying to login twice on startup
open idiot-friendly dialog when application is not configured bump version
-rw-r--r--AndroidManifest.xml4
-rw-r--r--res/values/strings.xml2
-rw-r--r--src/org/fox/ttrss/MainActivity.java27
3 files changed, 25 insertions, 8 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 463de49f..10a13213 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
- android:versionCode="85"
- android:versionName="0.6.9" >
+ android:versionCode="86"
+ android:versionName="0.6.10" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="11" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5057d690..137af4d9 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -121,4 +121,6 @@
<string name="article_set_note">Publish with note</string>
<string name="close_feed">Close feed</string>
<string name="close_article">Close article</string>
+ <string name="dialog_open_preferences">Open preferences</string>
+ <string name="dialog_need_configure_prompt">Please fill in your tt-rss server information such as URL, login, and password.</string>
</resources> \ No newline at end of file
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());