mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
fix long-reused activities not loading on resume
This commit is contained in:
parent
48aa646cee
commit
f3062cd959
2 changed files with 8 additions and 10 deletions
|
@ -62,11 +62,6 @@ public abstract class ItemsList extends NbActivity implements StoryOrderChangedL
|
||||||
|
|
||||||
fs = (FeedSet) getIntent().getSerializableExtra(EXTRA_FEED_SET);
|
fs = (FeedSet) getIntent().getSerializableExtra(EXTRA_FEED_SET);
|
||||||
|
|
||||||
// this is not strictly necessary, since our first refresh with the fs will swap in
|
|
||||||
// the correct session, but that can be delayed by sync backup, so we try here to
|
|
||||||
// reduce UI lag
|
|
||||||
FeedUtils.prepareReadingSession(fs);
|
|
||||||
|
|
||||||
intelState = PrefsUtils.getStateFilter(this);
|
intelState = PrefsUtils.getStateFilter(this);
|
||||||
|
|
||||||
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
|
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
|
||||||
|
@ -129,6 +124,10 @@ public abstract class ItemsList extends NbActivity implements StoryOrderChangedL
|
||||||
// Reading activities almost certainly changed the read/unread state of some stories. Ensure
|
// Reading activities almost certainly changed the read/unread state of some stories. Ensure
|
||||||
// we reflect those changes promptly.
|
// we reflect those changes promptly.
|
||||||
itemListFragment.hasUpdated();
|
itemListFragment.hasUpdated();
|
||||||
|
// this is not strictly necessary, since our first refresh with the fs will swap in
|
||||||
|
// the correct session, but that can be delayed by sync backup, so we try here to
|
||||||
|
// reduce UI lag, or in case somehow we got redisplayed in a zero-story state
|
||||||
|
FeedUtils.prepareReadingSession(fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -127,11 +127,6 @@ public abstract class Reading extends NbActivity implements OnPageChangeListener
|
||||||
|
|
||||||
fs = (FeedSet)getIntent().getSerializableExtra(EXTRA_FEEDSET);
|
fs = (FeedSet)getIntent().getSerializableExtra(EXTRA_FEEDSET);
|
||||||
|
|
||||||
// this is not strictly necessary, since our first refresh with the fs will swap in
|
|
||||||
// the correct session, but that can be delayed by sync backup, so we try here to
|
|
||||||
// reduce UI lag
|
|
||||||
FeedUtils.prepareReadingSession(fs);
|
|
||||||
|
|
||||||
if ((savedInstanceBundle != null) && savedInstanceBundle.containsKey(BUNDLE_STARTING_UNREAD)) {
|
if ((savedInstanceBundle != null) && savedInstanceBundle.containsKey(BUNDLE_STARTING_UNREAD)) {
|
||||||
startingUnreadCount = savedInstanceBundle.getInt(BUNDLE_STARTING_UNREAD);
|
startingUnreadCount = savedInstanceBundle.getInt(BUNDLE_STARTING_UNREAD);
|
||||||
}
|
}
|
||||||
|
@ -219,6 +214,10 @@ public abstract class Reading extends NbActivity implements OnPageChangeListener
|
||||||
// onCreate() in our subclass should have called createLoader(), but sometimes the callback never makes it.
|
// onCreate() in our subclass should have called createLoader(), but sometimes the callback never makes it.
|
||||||
// this ensures that at least one callback happens after activity re-create.
|
// this ensures that at least one callback happens after activity re-create.
|
||||||
getLoaderManager().restartLoader(0, null, this);
|
getLoaderManager().restartLoader(0, null, this);
|
||||||
|
// this is not strictly necessary, since our first refresh with the fs will swap in
|
||||||
|
// the correct session, but that can be delayed by sync backup, so we try here to
|
||||||
|
// reduce UI lag, or in case somehow we got redisplayed in a zero-story state
|
||||||
|
FeedUtils.prepareReadingSession(fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue