Skip to content

Commit

Permalink
Login activity tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
aziraphale committed Apr 15, 2012
1 parent 75cf2b3 commit 7bb058b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/com/iskrembilen/quasseldroid/gui/LoginActivity.java
Expand Up @@ -151,11 +151,10 @@ public void onCreate(Bundle savedInstanceState) {

@Override
protected void onReceiveResult(int resultCode, Bundle resultData) {
if (resultCode==CoreConnService.CONNECTION_CONNECTED) {
// Already connected (probably the app being launched again while already connected)
LoginActivity.this.startActivity(new Intent(LoginActivity.this, BufferActivity.class));
} else if (resultCode==CoreConnService.CONNECTION_CONNECTING) {
removeDialog(R.id.DIALOG_CONNECTING);
if (resultCode==CoreConnService.CONNECTION_CONNECTED ||
resultCode==CoreConnService.CONNECTION_CONNECTING) {
// Just connected or already connected (probably the
// app being launched again while already connected)
Intent bufferIntent = new Intent(LoginActivity.this, BufferActivity.class);
if (sharedString != null && sharedString.length() > 0) {
bufferIntent.putExtra(BufferActivity.BUFFER_SHARE_EXTRA_TEXT, sharedString);
Expand All @@ -164,6 +163,11 @@ protected void onReceiveResult(int resultCode, Bundle resultData) {
}
sharedString = null;
sharedUri = null;

if (resultCode==CoreConnService.CONNECTION_CONNECTING) {
// Remove the dialog if we've just finished connecting
removeDialog(R.id.DIALOG_CONNECTING);
}
LoginActivity.this.startActivity(bufferIntent);
}else if (resultCode==CoreConnService.CONNECTION_DISCONNECTED) {
if (resultData!=null){
Expand Down

0 comments on commit 7bb058b

Please sign in to comment.