use of org.fdroid.fdroid.data.NewRepoConfig in project fdroidclient by f-droid.
the class SwapWorkflowActivity method setUpConfirmReceive.
private void setUpConfirmReceive() {
TextView descriptionTextView = findViewById(R.id.text_description);
if (descriptionTextView != null) {
descriptionTextView.setText(getString(R.string.swap_confirm_connect, confirmSwapConfig.getHost()));
}
Button confirmReceiveYes = container.findViewById(R.id.confirm_receive_yes);
if (confirmReceiveYes != null) {
confirmReceiveYes.setOnClickListener(v -> denySwap());
}
Button confirmReceiveNo = container.findViewById(R.id.confirm_receive_no);
if (confirmReceiveNo != null) {
confirmReceiveNo.setOnClickListener(new View.OnClickListener() {
private final NewRepoConfig config = confirmSwapConfig;
@Override
public void onClick(View v) {
swapWith(config);
}
});
}
}
use of org.fdroid.fdroid.data.NewRepoConfig in project fdroidclient by f-droid.
the class ManageReposActivity method addRepoFromIntent.
private void addRepoFromIntent(Intent intent) {
/* an URL from a click, NFC, QRCode scan, etc */
NewRepoConfig newRepoConfig = new NewRepoConfig(this, intent);
if (newRepoConfig.isValidRepo()) {
finishAfterAddingRepo = intent.getBooleanExtra(EXTRA_FINISH_AFTER_ADDING_REPO, true);
showAddRepo(newRepoConfig.getRepoUriString(), newRepoConfig.getFingerprint(), newRepoConfig.getUsername(), newRepoConfig.getPassword());
checkIfNewRepoOnSameWifi(newRepoConfig);
} else if (newRepoConfig.getErrorMessage() != null) {
Toast.makeText(this, newRepoConfig.getErrorMessage(), Toast.LENGTH_LONG).show();
}
}
Aggregations