Skip to content

Commit

Permalink
Restore auth cookies when using chrometophone
Browse files Browse the repository at this point in the history
  • Loading branch information
scottferg committed Mar 3, 2011
1 parent 56c9557 commit 1b69702
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/com/ferg/awful/ThreadDisplayActivity.java
Expand Up @@ -65,6 +65,7 @@
import com.ferg.awful.async.DrawableManager;
import com.ferg.awful.constants.Constants;
import com.ferg.awful.htmlwidget.HtmlView;
import com.ferg.awful.network.NetworkUtils;
import com.ferg.awful.reply.Reply;
import com.ferg.awful.thread.AwfulPost;
import com.ferg.awful.thread.AwfulThread;
Expand Down Expand Up @@ -107,7 +108,12 @@ public void onCreate(Bundle savedInstanceState)
// We may be getting thread info from ChromeToPhone so handle that here
if (getIntent().getData() != null) {
if (getIntent().getData().getScheme().equals("http")) {
Log.i(TAG, getIntent().getData().getQueryParameter("pagenumber"));
boolean loggedIn = NetworkUtils.restoreLoginCookies(this);

// Make sure we're logged in
if (!loggedIn) {
startActivityForResult(new Intent().setClass(this, AwfulLoginActivity.class), 0);
}

mThread = new AwfulThread(getIntent().getData().getQueryParameter("threadid"));

Expand Down

0 comments on commit 1b69702

Please sign in to comment.