Skip to content

Commit

Permalink
Merge pull request #42 from w-shackleton/fix-21
Browse files Browse the repository at this point in the history
Moved setRedirect inside button onClick. Fixes #21
  • Loading branch information
w-shackleton committed Jan 6, 2015
2 parents 0f40246 + 526ff76 commit e14a9aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ public Dialog displayExtraDialog(final Context context, final OnExtraDialogDoneL
ok = (Button) dialog.findViewById(R.id.ok),
cancel = (Button) dialog.findViewById(R.id.cancel);

String userEntry = input.getText().toString();
if(userEntry.equals("")) userEntry = "http://blueballfixed.ytmnd.com/";
prefs.edit().putString("redirectUrl", userEntry).commit();

setRedirect(userEntry);

ok.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
String userEntry = input.getText().toString();
if(userEntry.equals("")) userEntry = "http://blueballfixed.ytmnd.com/";
prefs.edit().putString("redirectUrl", userEntry).commit();

setRedirect(userEntry);

dialog.dismiss();
onDone.onDone();
}
Expand Down
2 changes: 1 addition & 1 deletion androidnetspoof/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<string name="customTextDesc">Enter custom text values to change. Blank fields are ignored.</string>
<string name="configuring">Configuring&#8230;</string>
<string name="lookingupSite">Finding website&#8230;</string>
<string name="customwebsitedesc">Please enter a website to redirect to, not including http:// (eg. kittenwar.com).</string>
<string name="customwebsitedesc">Please enter a website to redirect to, eg. kittenwar.com.</string>
<string name="warningTitle">Don\'t be evil!</string>
<string name="warningText">Remember, only run Network Spoofer when you have permission to do so. Don\'t run at work, university, school etc. without the permission of your network administrators.</string>
<string name="useLocalFile">Use Local File</string>
Expand Down

0 comments on commit e14a9aa

Please sign in to comment.