properly clear active article when going back from headlinesactivity in

tablet mode
bump version
This commit is contained in:
Andrew Dolgov 2013-02-24 00:52:00 +04:00
parent cdec1852e0
commit d381abd82a
2 changed files with 13 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss" package="org.fox.ttrss"
android:versionCode="137" android:versionCode="138"
android:versionName="1.15" > android:versionName="1.16" >
<uses-sdk <uses-sdk
android:minSdkVersion="8" android:minSdkVersion="8"

View File

@ -27,6 +27,8 @@ import android.widget.LinearLayout;
public class FeedsActivity extends OnlineActivity implements HeadlinesEventListener { public class FeedsActivity extends OnlineActivity implements HeadlinesEventListener {
private final String TAG = this.getClass().getSimpleName(); private final String TAG = this.getClass().getSimpleName();
private static final int HEADLINES_REQUEST = 1;
protected SharedPreferences m_prefs; protected SharedPreferences m_prefs;
protected long m_lastRefresh = 0; protected long m_lastRefresh = 0;
@ -328,7 +330,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
intent.putExtra("article", (Article)null); intent.putExtra("article", (Article)null);
intent.putExtra("searchQuery", (String)null); intent.putExtra("searchQuery", (String)null);
startActivityForResult(intent, 0); startActivityForResult(intent, HEADLINES_REQUEST);
overridePendingTransition(R.anim.right_slide_in, 0); overridePendingTransition(R.anim.right_slide_in, 0);
} }
} }
@ -360,7 +362,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
intent.putExtra("article", article); intent.putExtra("article", article);
intent.putExtra("searchQuery", hf.getSearchQuery()); intent.putExtra("searchQuery", hf.getSearchQuery());
startActivityForResult(intent, 0); startActivityForResult(intent, HEADLINES_REQUEST);
overridePendingTransition(R.anim.right_slide_in, 0); overridePendingTransition(R.anim.right_slide_in, 0);
} }
} else { } else {
@ -383,4 +385,11 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == HEADLINES_REQUEST) {
GlobalState.getInstance().m_activeArticle = null;
}
}
} }