Skip to content

Commit

Permalink
FTP: Allow fragment to open when inet is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
VishalNehra committed Aug 20, 2017
1 parent b7894a2 commit 368ad10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which)
if (mSecureCheckBox.isChecked()) {
setSecurePreference(true);
} else setSecurePreference(false);

// TODO: Fix secure connection certification
mSecureCheckBox.setEnabled(false);
setSecurePreference(false);
// TODO: Fix secure connection certification
}
});

Expand Down Expand Up @@ -476,14 +481,14 @@ public void onClick(View v) {
*/
private void updateSpans() {

String ftpAddress = "";
String ftpAddress;

try{
ftpAddress = getFTPAddressString();
} catch (NullPointerException npe){
npe.printStackTrace();
ftpAddress = "";
Toast.makeText(getContext(), getResources().getString(R.string.local_inet_addr_error), Toast.LENGTH_SHORT).show();
mainActivity.onBackPressed();
}

String statusHead = getResources().getString(R.string.ftp_status_title) + ": ";
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/dialog_ftp_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
android:layout_height="wrap_content"
android:text="@string/ftp_status_secure_connection"
android:layout_gravity="end"
android:enabled="false"
/>
</LinearLayout>
</LinearLayout>

0 comments on commit 368ad10

Please sign in to comment.