remove obsolete code
This commit is contained in:
parent
882824190c
commit
1d82edfc0b
@ -77,51 +77,20 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
if (m_slidingMenu != null)
|
if (m_slidingMenu != null)
|
||||||
m_slidingMenu.showMenu();
|
m_slidingMenu.showMenu();
|
||||||
|
|
||||||
/* if (intent.getParcelableExtra("article") != null) {
|
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
m_actionbarUpEnabled = true;
|
|
||||||
|
|
||||||
Feed feed = (Feed) intent.getParcelableExtra("feed");
|
|
||||||
FeedCategory cat = (FeedCategory) intent.getParcelableExtra("category");
|
|
||||||
Article article = (Article) intent.getParcelableExtra("article");
|
|
||||||
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
|
||||||
|
|
||||||
if (article != null) {
|
|
||||||
Article original = GlobalState.getInstance().m_loadedArticles.findById(article.id);
|
|
||||||
|
|
||||||
ArticlePager ap = new ArticlePager();
|
|
||||||
ap.initialize(original != null ? original : article, feed);
|
|
||||||
|
|
||||||
ft.replace(R.id.feeds_fragment, ap, FRAG_ARTICLE);
|
|
||||||
|
|
||||||
ap.setSearchQuery(intent.getStringExtra("searchQuery"));
|
|
||||||
|
|
||||||
setTitle(feed.title);
|
|
||||||
}
|
|
||||||
|
|
||||||
ft.commit();
|
|
||||||
|
|
||||||
} else { */
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
|
||||||
|
|
||||||
if (m_prefs.getBoolean("enable_cats", false)) {
|
if (m_prefs.getBoolean("enable_cats", false)) {
|
||||||
ft.replace(R.id.feeds_fragment, new FeedCategoriesFragment(), FRAG_CATS);
|
ft.replace(R.id.feeds_fragment, new FeedCategoriesFragment(), FRAG_CATS);
|
||||||
} else {
|
} else {
|
||||||
ft.replace(R.id.feeds_fragment, new FeedsFragment(), FRAG_FEEDS);
|
ft.replace(R.id.feeds_fragment, new FeedsFragment(), FRAG_FEEDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ft.commit();
|
||||||
|
|
||||||
/* if (!isSmallScreen()) {
|
AppRater.appLaunched(this);
|
||||||
ft.replace(R.id.headlines_fragment, new HeadlinesFragment(new Feed(-3, "Fresh articles", false)));
|
checkTrial(true);
|
||||||
} */
|
|
||||||
|
|
||||||
ft.commit();
|
|
||||||
|
|
||||||
AppRater.appLaunched(this);
|
|
||||||
checkTrial(true);
|
|
||||||
//}
|
|
||||||
} else { // savedInstanceState != null
|
} else { // savedInstanceState != null
|
||||||
m_actionbarUpEnabled = savedInstanceState.getBoolean("actionbarUpEnabled");
|
m_actionbarUpEnabled = savedInstanceState.getBoolean("actionbarUpEnabled");
|
||||||
m_actionbarRevertDepth = savedInstanceState.getInt("actionbarRevertDepth");
|
m_actionbarRevertDepth = savedInstanceState.getInt("actionbarRevertDepth");
|
||||||
@ -154,7 +123,6 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
if (m_menu != null && getSessionId() != null) {
|
if (m_menu != null && getSessionId() != null) {
|
||||||
Fragment ff = getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
Fragment ff = getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
||||||
Fragment cf = getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
|
Fragment cf = getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
|
||||||
//ArticlePager af = (ArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
|
||||||
HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
|
|
||||||
if (m_slidingMenu != null) {
|
if (m_slidingMenu != null) {
|
||||||
@ -162,32 +130,11 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded() && !m_slidingMenu.isMenuShowing());
|
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded() && !m_slidingMenu.isMenuShowing());
|
||||||
} else {
|
} else {
|
||||||
m_menu.setGroupVisible(R.id.menu_group_feeds, (ff != null && ff.isAdded()) || (cf != null && cf.isAdded()));
|
m_menu.setGroupVisible(R.id.menu_group_feeds, (ff != null && ff.isAdded()) || (cf != null && cf.isAdded()));
|
||||||
//m_menu.setGroupVisible(R.id.menu_group_article, af != null && af.isAdded());
|
|
||||||
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded());
|
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded());
|
||||||
|
|
||||||
m_menu.findItem(R.id.update_headlines).setVisible(false);
|
m_menu.findItem(R.id.update_headlines).setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (isSmallScreen()) {
|
|
||||||
m_menu.findItem(R.id.update_headlines).setVisible(hf != null && hf.isAdded());
|
|
||||||
} else {
|
|
||||||
m_menu.findItem(R.id.update_headlines).setVisible(false);
|
|
||||||
} */
|
|
||||||
|
|
||||||
/* if (af != null) {
|
|
||||||
if (af.getSelectedArticle() != null && af.getSelectedArticle().attachments != null && af.getSelectedArticle().attachments.size() > 0) {
|
|
||||||
if (!isCompatMode()) {
|
|
||||||
m_menu.findItem(R.id.toggle_attachments).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
|
||||||
}
|
|
||||||
m_menu.findItem(R.id.toggle_attachments).setVisible(true);
|
|
||||||
} else {
|
|
||||||
if (!isCompatMode()) {
|
|
||||||
m_menu.findItem(R.id.toggle_attachments).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
|
|
||||||
}
|
|
||||||
m_menu.findItem(R.id.toggle_attachments).setVisible(false);
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
|
|
||||||
MenuItem item = m_menu.findItem(R.id.show_feeds);
|
MenuItem item = m_menu.findItem(R.id.show_feeds);
|
||||||
|
|
||||||
if (getUnreadOnly()) {
|
if (getUnreadOnly()) {
|
||||||
@ -253,32 +200,24 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
|
|
||||||
if (!openAsFeed) {
|
if (!openAsFeed) {
|
||||||
|
|
||||||
if (false && isSmallScreen()) {
|
if (fc != null) {
|
||||||
|
fc.setSelectedCategory(null);
|
||||||
Intent intent = new Intent(FeedsActivity.this, FeedsActivity.class);
|
|
||||||
intent.putExtra("category", cat);
|
|
||||||
|
|
||||||
startActivityForResult(intent, 0);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (fc != null) {
|
|
||||||
fc.setSelectedCategory(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager()
|
|
||||||
.beginTransaction();
|
|
||||||
|
|
||||||
FeedsFragment ff = new FeedsFragment();
|
|
||||||
ff.initialize(cat);
|
|
||||||
ft.replace(R.id.feeds_fragment, ff, FRAG_FEEDS);
|
|
||||||
|
|
||||||
ft.addToBackStack(null);
|
|
||||||
ft.commit();
|
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
m_actionbarUpEnabled = true;
|
|
||||||
m_actionbarRevertDepth = m_actionbarRevertDepth + 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FragmentTransaction ft = getSupportFragmentManager()
|
||||||
|
.beginTransaction();
|
||||||
|
|
||||||
|
FeedsFragment ff = new FeedsFragment();
|
||||||
|
ff.initialize(cat);
|
||||||
|
ft.replace(R.id.feeds_fragment, ff, FRAG_FEEDS);
|
||||||
|
|
||||||
|
ft.addToBackStack(null);
|
||||||
|
ft.commit();
|
||||||
|
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
m_actionbarUpEnabled = true;
|
||||||
|
m_actionbarRevertDepth = m_actionbarRevertDepth + 1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (fc != null) {
|
if (fc != null) {
|
||||||
@ -364,26 +303,15 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void openFeedArticles(Feed feed) {
|
public void openFeedArticles(Feed feed) {
|
||||||
/* if (isSmallScreen()) {
|
GlobalState.getInstance().m_loadedArticles.clear();
|
||||||
Intent intent = new Intent(FeedsActivity.this, FeedsActivity.class);
|
|
||||||
|
Intent intent = new Intent(FeedsActivity.this, HeadlinesActivity.class);
|
||||||
GlobalState.getInstance().m_activeFeed = feed;
|
intent.putExtra("feed", feed);
|
||||||
GlobalState.getInstance().m_loadedArticles.clear();
|
intent.putExtra("article", (Article)null);
|
||||||
|
intent.putExtra("searchQuery", (String)null);
|
||||||
intent.putExtra("feed", feed);
|
|
||||||
intent.putExtra("article", new Article());
|
startActivityForResult(intent, HEADLINES_REQUEST);
|
||||||
startActivityForResult(intent, 0);
|
overridePendingTransition(R.anim.right_slide_in, 0);
|
||||||
} else { */
|
|
||||||
GlobalState.getInstance().m_loadedArticles.clear();
|
|
||||||
|
|
||||||
Intent intent = new Intent(FeedsActivity.this, HeadlinesActivity.class);
|
|
||||||
intent.putExtra("feed", feed);
|
|
||||||
intent.putExtra("article", (Article)null);
|
|
||||||
intent.putExtra("searchQuery", (String)null);
|
|
||||||
|
|
||||||
startActivityForResult(intent, HEADLINES_REQUEST);
|
|
||||||
overridePendingTransition(R.anim.right_slide_in, 0);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onArticleSelected(Article article, boolean open) {
|
public void onArticleSelected(Article article, boolean open) {
|
||||||
@ -395,27 +323,14 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
if (open) {
|
if (open) {
|
||||||
HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
|
|
||||||
/* if (isSmallScreen()) {
|
Intent intent = new Intent(FeedsActivity.this, HeadlinesActivity.class);
|
||||||
|
intent.putExtra("feed", hf.getFeed());
|
||||||
|
intent.putExtra("article", article);
|
||||||
|
intent.putExtra("searchQuery", hf.getSearchQuery());
|
||||||
|
|
||||||
|
startActivityForResult(intent, HEADLINES_REQUEST);
|
||||||
|
overridePendingTransition(R.anim.right_slide_in, 0);
|
||||||
|
|
||||||
//GlobalState.getInstance().m_loadedArticles.clear();
|
|
||||||
|
|
||||||
Intent intent = new Intent(FeedsActivity.this, FeedsActivity.class);
|
|
||||||
intent.putExtra("feed", hf.getFeed());
|
|
||||||
intent.putExtra("article", article);
|
|
||||||
intent.putExtra("searchQuery", hf.getSearchQuery());
|
|
||||||
|
|
||||||
startActivityForResult(intent, 0);
|
|
||||||
|
|
||||||
|
|
||||||
} else { */
|
|
||||||
Intent intent = new Intent(FeedsActivity.this, HeadlinesActivity.class);
|
|
||||||
intent.putExtra("feed", hf.getFeed());
|
|
||||||
intent.putExtra("article", article);
|
|
||||||
intent.putExtra("searchQuery", hf.getSearchQuery());
|
|
||||||
|
|
||||||
startActivityForResult(intent, HEADLINES_REQUEST);
|
|
||||||
overridePendingTransition(R.anim.right_slide_in, 0);
|
|
||||||
//}
|
|
||||||
} else {
|
} else {
|
||||||
initMenu();
|
initMenu();
|
||||||
}
|
}
|
||||||
|
@ -89,15 +89,9 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
}
|
}
|
||||||
|
|
||||||
setLoadingStatus(R.string.blank, false);
|
setLoadingStatus(R.string.blank, false);
|
||||||
//findViewById(R.id.loading_container).setVisibility(View.GONE);
|
|
||||||
|
|
||||||
initMenu();
|
initMenu();
|
||||||
|
|
||||||
/* if (!isSmallScreen()) {
|
|
||||||
LinearLayout container = (LinearLayout) findViewById(R.id.fragment_container);
|
|
||||||
container.setWeightSum(3f);
|
|
||||||
} */
|
|
||||||
|
|
||||||
if (!isCompatMode() && !isSmallScreen()) {
|
if (!isCompatMode() && !isSmallScreen()) {
|
||||||
((ViewGroup)findViewById(R.id.headlines_fragment)).setLayoutTransition(new LayoutTransition());
|
((ViewGroup)findViewById(R.id.headlines_fragment)).setLayoutTransition(new LayoutTransition());
|
||||||
((ViewGroup)findViewById(R.id.feeds_fragment)).setLayoutTransition(new LayoutTransition());
|
((ViewGroup)findViewById(R.id.feeds_fragment)).setLayoutTransition(new LayoutTransition());
|
||||||
@ -164,7 +158,6 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
if (m_menu != null) {
|
if (m_menu != null) {
|
||||||
Fragment ff = getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
Fragment ff = getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
||||||
Fragment cf = getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
|
Fragment cf = getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
|
||||||
//OfflineArticlePager af = (OfflineArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
|
||||||
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
|
|
||||||
if (m_slidingMenu != null) {
|
if (m_slidingMenu != null) {
|
||||||
@ -172,18 +165,9 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded() && !m_slidingMenu.isMenuShowing());
|
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded() && !m_slidingMenu.isMenuShowing());
|
||||||
} else {
|
} else {
|
||||||
m_menu.setGroupVisible(R.id.menu_group_feeds, (ff != null && ff.isAdded()) || (cf != null && cf.isAdded()));
|
m_menu.setGroupVisible(R.id.menu_group_feeds, (ff != null && ff.isAdded()) || (cf != null && cf.isAdded()));
|
||||||
//m_menu.setGroupVisible(R.id.menu_group_article, af != null && af.isAdded());
|
|
||||||
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded());
|
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* m_menu.setGroupVisible(R.id.menu_group_feeds, (ff != null && ff.isAdded()) || (cf != null && cf.isAdded()));
|
|
||||||
|
|
||||||
m_menu.setGroupVisible(R.id.menu_group_article, af != null && af.isAdded());
|
|
||||||
|
|
||||||
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded()); */
|
|
||||||
//m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded() && getSelectedArticleCount() == 0);
|
|
||||||
//m_menu.setGroupVisible(R.id.menu_group_headlines_selection, hf != null && hf.isAdded() && getSelectedArticleCount() != 0);
|
|
||||||
|
|
||||||
MenuItem item = m_menu.findItem(R.id.show_feeds);
|
MenuItem item = m_menu.findItem(R.id.show_feeds);
|
||||||
|
|
||||||
if (getUnreadOnly()) {
|
if (getUnreadOnly()) {
|
||||||
@ -208,31 +192,24 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
|
|
||||||
onFeedSelected(catId, true, true);
|
onFeedSelected(catId, true, true);
|
||||||
} else {
|
} else {
|
||||||
/* if (isSmallScreen()) {
|
if (fc != null) {
|
||||||
Intent intent = new Intent(OfflineFeedsActivity.this, OfflineFeedsActivity.class);
|
fc.setSelectedFeedId(-1);
|
||||||
intent.putExtra("category", catId);
|
}
|
||||||
|
|
||||||
|
FragmentTransaction ft = getSupportFragmentManager()
|
||||||
|
.beginTransaction();
|
||||||
|
|
||||||
startActivityForResult(intent, 0);
|
OfflineFeedsFragment ff = new OfflineFeedsFragment();
|
||||||
} else { */
|
ff.initialize(catId);
|
||||||
if (fc != null) {
|
|
||||||
fc.setSelectedFeedId(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager()
|
|
||||||
.beginTransaction();
|
|
||||||
|
|
||||||
OfflineFeedsFragment ff = new OfflineFeedsFragment();
|
ft.replace(R.id.feeds_fragment, ff, FRAG_FEEDS);
|
||||||
ff.initialize(catId);
|
ft.addToBackStack(null);
|
||||||
|
|
||||||
ft.replace(R.id.feeds_fragment, ff, FRAG_FEEDS);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
ft.addToBackStack(null);
|
m_actionbarUpEnabled = true;
|
||||||
|
m_actionbarRevertDepth = m_actionbarRevertDepth + 1;
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
m_actionbarUpEnabled = true;
|
ft.commit();
|
||||||
m_actionbarRevertDepth = m_actionbarRevertDepth + 1;
|
|
||||||
|
|
||||||
ft.commit();
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,54 +220,31 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
public void onFeedSelected(final int feedId, final boolean isCat, boolean open) {
|
public void onFeedSelected(final int feedId, final boolean isCat, boolean open) {
|
||||||
|
|
||||||
if (open) {
|
if (open) {
|
||||||
/* if (isSmallScreen()) {
|
if (!isSmallScreen()) {
|
||||||
|
LinearLayout container = (LinearLayout) findViewById(R.id.fragment_container);
|
||||||
Intent intent = new Intent(OfflineFeedsActivity.this, OfflineFeedsActivity.class);
|
container.setWeightSum(3f);
|
||||||
intent.putExtra("feed", feedId);
|
}
|
||||||
intent.putExtra("isCat", isCat);
|
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
startActivityForResult(intent, 0);
|
@Override
|
||||||
|
public void run() {
|
||||||
} else { */
|
FragmentTransaction ft = getSupportFragmentManager()
|
||||||
/* if (!isCompatMode()) {
|
.beginTransaction();
|
||||||
LinearLayout container = (LinearLayout) findViewById(R.id.fragment_container);
|
|
||||||
float wSum = container.getWeightSum();
|
OfflineHeadlinesFragment hf = new OfflineHeadlinesFragment();
|
||||||
if (wSum <= 2.0f) {
|
hf.initialize(feedId, isCat);
|
||||||
ObjectAnimator anim = ObjectAnimator.ofFloat(container, "weightSum", wSum, 3.0f);
|
ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES);
|
||||||
anim.setDuration(200);
|
|
||||||
anim.start();
|
ft.commit();
|
||||||
|
|
||||||
|
if (m_slidingMenu != null) {
|
||||||
|
m_slidingMenu.showContent();
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
m_actionbarUpEnabled = true;
|
||||||
}
|
}
|
||||||
} */
|
|
||||||
|
|
||||||
// ^ no idea why the animation hangs half the time :(
|
|
||||||
|
|
||||||
if (!isSmallScreen()) {
|
|
||||||
LinearLayout container = (LinearLayout) findViewById(R.id.fragment_container);
|
|
||||||
container.setWeightSum(3f);
|
|
||||||
}
|
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager()
|
|
||||||
.beginTransaction();
|
|
||||||
|
|
||||||
OfflineHeadlinesFragment hf = new OfflineHeadlinesFragment();
|
|
||||||
hf.initialize(feedId, isCat);
|
|
||||||
ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES);
|
|
||||||
|
|
||||||
ft.commit();
|
|
||||||
|
|
||||||
if (m_slidingMenu != null) {
|
|
||||||
m_slidingMenu.showContent();
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
m_actionbarUpEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, 10);
|
}, 10);
|
||||||
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,30 +280,17 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
initMenu();
|
initMenu();
|
||||||
|
|
||||||
if (open) {
|
if (open) {
|
||||||
/* if (isSmallScreen()) {
|
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
|
|
||||||
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
|
||||||
|
|
||||||
Intent intent = new Intent(OfflineFeedsActivity.this, OfflineFeedsActivity.class);
|
|
||||||
intent.putExtra("feed", hf.getFeedId());
|
|
||||||
intent.putExtra("isCat", hf.getFeedIsCat());
|
|
||||||
intent.putExtra("article", articleId);
|
|
||||||
|
|
||||||
startActivityForResult(intent, 0);
|
|
||||||
|
|
||||||
} else { */
|
Intent intent = new Intent(OfflineFeedsActivity.this, OfflineHeadlinesActivity.class);
|
||||||
|
intent.putExtra("feed", hf.getFeedId());
|
||||||
|
intent.putExtra("isCat", hf.getFeedIsCat());
|
||||||
|
intent.putExtra("article", articleId);
|
||||||
|
|
||||||
|
startActivityForResult(intent, 0);
|
||||||
|
|
||||||
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
overridePendingTransition(R.anim.right_slide_in, 0);
|
||||||
|
|
||||||
Intent intent = new Intent(OfflineFeedsActivity.this, OfflineHeadlinesActivity.class);
|
|
||||||
intent.putExtra("feed", hf.getFeedId());
|
|
||||||
intent.putExtra("isCat", hf.getFeedIsCat());
|
|
||||||
intent.putExtra("article", articleId);
|
|
||||||
|
|
||||||
startActivityForResult(intent, 0);
|
|
||||||
|
|
||||||
overridePendingTransition(R.anim.right_slide_in, 0);
|
|
||||||
//}
|
|
||||||
} else {
|
} else {
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
@ -141,10 +141,7 @@ public class OfflineHeadlinesActivity extends OfflineActivity implements Offline
|
|||||||
|
|
||||||
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
|
|
||||||
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded());
|
m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.isAdded() && hf.isVisible());
|
||||||
|
|
||||||
//m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.getSelectedArticleCount() == 0);
|
|
||||||
//m_menu.setGroupVisible(R.id.menu_group_headlines_selection, hf != null && hf.getSelectedArticleCount() != 0);
|
|
||||||
|
|
||||||
Fragment af = getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
Fragment af = getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user