+ fab = context.findViewById(R.id.fab);
+ fab.setOnClickListener(v -> {
+ if (mProfile != null) {
+ mProfile.setName(profileName.getText());
+ mProfile.setUrl(url.getText());
+ mProfile.setAuthEnabled(useAuthentication.isChecked());
+ mProfile.setAuthUserName(userName.getText());
+ mProfile.setAuthPassword(password.getText());
+ mProfile.storeInDB();
+ Log.d("profiles", "profile stored in DB");
+ Data.profiles.triggerItemChangedNotification(mProfile);
+
+
+ if (mProfile.getUuid().equals(Data.profile.get().getUuid())) {
+ // dummy update to notify the observers of the possibly new name/URL
+ Data.profile.set(mProfile);