Skip to content

Instantly share code, notes, and snippets.

@robertberry-zz
Created November 27, 2013 17:02
Show Gist options
  • Save robertberry-zz/7679248 to your computer and use it in GitHub Desktop.
Save robertberry-zz/7679248 to your computer and use it in GitHub Desktop.
Look at this :-(
public class Blah {
public void blah() {
/**
* Do this here, as otherwise we might end up loading comments twice if the Observable completes before the
* web view HTML renders.
*/
final boolean loadRelated = (relatedContent != null);
new Handler().post(new Runnable() {
@Override
public void run() {
loadWebviewHtml(currentItem);
if (loadRelated) {
LogHelper.info("Loaded related content from saved state");
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
onItemRelated(relatedContent);
}
}, 200);
}
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment