Merge pull request #503 from FineFindus/feat/profile-note-save-feedback

feat(Profile): display Toast when saving note
This commit is contained in:
LucasGGamerM 2024-08-11 09:38:45 -03:00 committed by GitHub
commit 13545fd5ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -287,11 +287,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
noteEdit.setOnFocusChangeListener((v, hasFocus)->{ noteEdit.setOnFocusChangeListener((v, hasFocus)->{
if(hasFocus){ if(hasFocus){
hideFab(); hideFab();
noteEdit.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); return;
}else{
showFab();
savePrivateNote(noteEdit.getText().toString());
} }
showFab();
savePrivateNote(noteEdit.getText().toString());
}); });
FrameLayout sizeWrapper=new FrameLayout(getActivity()){ FrameLayout sizeWrapper=new FrameLayout(getActivity()){
@ -469,6 +468,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
public void onSuccess(Relationship result) { public void onSuccess(Relationship result) {
updateRelationship(result); updateRelationship(result);
invalidateOptionsMenu(); invalidateOptionsMenu();
Toast.makeText(getContext(), R.string.mo_personal_note_saved, Toast.LENGTH_SHORT).show();
} }
@Override @Override

View File

@ -16,6 +16,7 @@
<string name="mo_settings_app_version" translatable="false">Moshidon v%1$s (%2$d)</string> <string name="mo_settings_app_version" translatable="false">Moshidon v%1$s (%2$d)</string>
<string name="mo_personal_note">Add a note about this profile</string> <string name="mo_personal_note">Add a note about this profile</string>
<string name="mo_personal_note_saved">Note saved</string>
<string name="mo_personal_note_confirm">Confirm changes to note</string> <string name="mo_personal_note_confirm">Confirm changes to note</string>
<string name="mo_personal_note_update_failed">Failed to save note</string> <string name="mo_personal_note_update_failed">Failed to save note</string>
<string name="mo_settings_contribute">Contribute to Moshidon</string> <string name="mo_settings_contribute">Contribute to Moshidon</string>