Skip to content

Commit

Permalink
Restructure how antox gets nodes, connects and polls network. Should …
Browse files Browse the repository at this point in the history
…now work in LAN situations
  • Loading branch information
markwinter committed Jun 8, 2014
1 parent e5e86aa commit c9e814d
Show file tree
Hide file tree
Showing 10 changed files with 235 additions and 498 deletions.
26 changes: 0 additions & 26 deletions app/src/main/java/im/tox/antox/activities/AddFriendActivity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package im.tox.antox.activities;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
Expand Down Expand Up @@ -33,7 +31,6 @@
import im.tox.antox.fragments.PinDialogFragment;
import im.tox.antox.tox.ToxSingleton;
import im.tox.antox.utils.Constants;
import im.tox.antox.utils.DhtNode;
import im.tox.jtoxcore.FriendExistsException;
import im.tox.jtoxcore.ToxException;

Expand Down Expand Up @@ -72,29 +69,6 @@ public void onCreate(Bundle savedInstanceState) {
getSupportActionBar().setIcon(R.drawable.ic_actionbar);
}

// Check to see if user is connected to dht first

if(!DhtNode.connected) {
AlertDialog notConnectedAlertDialog = new AlertDialog.Builder(this).create();
notConnectedAlertDialog.setTitle(R.string.addfriend_no_internet);
notConnectedAlertDialog.setMessage(getString(R.string.addfriend_no_internet_text));
notConnectedAlertDialog.setIcon(R.drawable.ic_launcher);
notConnectedAlertDialog.setButton(getString(R.string.button_ok), new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {
finish();
}
});

notConnectedAlertDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
finish();
}
});
notConnectedAlertDialog.show();
}

context = getApplicationContext();
text = getString(R.string.addfriend_friend_added);

Expand Down

0 comments on commit c9e814d

Please sign in to comment.