import net.ktnx.mobileledger.ui.activity.ProfileDetailActivity;
import net.ktnx.mobileledger.utils.Colors;
+import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import java.net.MalformedURLException;
* represents.
*/
public static final String ARG_ITEM_ID = "item_id";
+ @NonNls
+ private static final String HTTPS_URL_START = "https://";
/**
* The dummy content this fragment is presenting.
mProfile.removeFromDB();
ArrayList<MobileLedgerProfile> oldList = Data.profiles.getValue();
if (oldList == null) throw new AssertionError();
- ArrayList<MobileLedgerProfile> newList =
- (ArrayList<MobileLedgerProfile>) oldList.clone();
+ ArrayList<MobileLedgerProfile> newList = new ArrayList<>(oldList);
newList.remove(mProfile);
Data.profiles.setValue(newList);
if (mProfile.equals(Data.profile.getValue())) {
mProfile.storeInDB();
final ArrayList<MobileLedgerProfile> profiles = Data.profiles.getValue();
if (profiles == null) throw new AssertionError();
- ArrayList<MobileLedgerProfile> newList =
- (ArrayList<MobileLedgerProfile>) profiles.clone();
+ ArrayList<MobileLedgerProfile> newList = new ArrayList<>(profiles);
newList.add(mProfile);
Data.profiles.setValue(newList);
MobileLedgerProfile.storeProfilesOrder();
}
else {
profileName.setText("");
- url.setText("https://");
+ url.setText(HTTPS_URL_START);
postingPermitted.setChecked(true);
useAuthentication.setChecked(false);
authParams.setVisibility(View.GONE);