prevent trying to login twice on startup
open idiot-friendly dialog when application is not configured bump version
This commit is contained in:
parent
9341df4c21
commit
e68c90cbce
@ -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" />
|
||||
|
||||
|
@ -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>
|
@ -709,7 +709,7 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
||||
if (m_sessionId != null) {
|
||||
loginSuccess();
|
||||
} else {
|
||||
login();
|
||||
//login(); -- handled in onResume()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1957,10 +1957,25 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
||||
|
||||
setLoadingStatus(R.string.login_need_configure, false);
|
||||
|
||||
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 {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user