feat(profile): add note delete icon

This commit is contained in:
FineFindus 2023-12-23 11:54:06 +01:00
parent f70ea97d9e
commit ccd313533b
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
2 changed files with 20 additions and 2 deletions

View File

@ -865,8 +865,9 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
}else{
blockDomain.setVisible(false);
}
menu.findItem(R.id.edit_note).setTitle(noteWrap.getVisibility()==View.GONE && (relationship.note==null || relationship.note.isEmpty())
? R.string.sk_add_note : R.string.sk_delete_note);
boolean canAddNote = noteWrap.getVisibility()==View.GONE && (relationship.note==null || relationship.note.isEmpty());
menu.findItem(R.id.edit_note).setTitle(canAddNote ? R.string.sk_add_note : R.string.sk_delete_note);
menu.findItem(R.id.edit_note).setIcon(canAddNote ? R.drawable.ic_fluent_person_note_24_regular : R.drawable.ic_fluent_person_delete_note_24_regular);
}
@Override

View File

@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M-2.996,-2.995L28,-2.995L28,28L-2.996,28ZM12.371,11.8c-0.449,-0.466 -1.157,0.217 -0.675,0.651l1.912,1.846c7.457,7.199 9.861,9.522 7.457,7.199l2.404,2.323c0.45,0.435 1.125,-0.217 0.675,-0.652z"/>
<path
android:pathData="m11,15c0,-0.351 0.06,-0.687 0.171,-1L4.253,14c-1.242,0 -2.249,1.007 -2.249,2.249v0.578c0,0.893 0.319,1.756 0.898,2.435 1.566,1.834 3.952,2.739 7.098,2.739 0.398,0 0.783,-0.014 1.156,-0.043 -0.101,-0.301 -0.156,-0.623 -0.156,-0.958v-0.535c-0.321,0.024 -0.655,0.036 -1,0.036 -2.738,0 -4.704,-0.746 -5.958,-2.214C3.695,17.881 3.504,17.362 3.504,16.827v-0.578c0,-0.414 0.335,-0.749 0.749,-0.749L11,15.5ZM10,2.005c2.761,0 5,2.239 5,5 0,2.761 -2.239,5 -5,5 -2.761,0 -5,-2.239 -5,-5 0,-2.761 2.239,-5 5,-5zM10,3.505c-1.933,0 -3.5,1.567 -3.5,3.5 0,1.933 1.567,3.5 3.5,3.5 1.933,0 3.5,-1.567 3.5,-3.5 0,-1.933 -1.567,-3.5 -3.5,-3.5zM12,15c0,-1.105 0.895,-2 2,-2h7c1.105,0 2,0.896 2,2v6c0,1.105 -0.895,2 -2,2h-7c-1.105,0 -2,-0.895 -2,-2zM14.5,16c-0.276,0 -0.5,0.224 -0.5,0.5 0,0.276 0.224,0.5 0.5,0.5h6c0.276,0 0.5,-0.224 0.5,-0.5 0,-0.276 -0.224,-0.5 -0.5,-0.5zM14.5,19c-0.276,0 -0.5,0.224 -0.5,0.5 0,0.276 0.224,0.5 0.5,0.5h6c0.276,0 0.5,-0.224 0.5,-0.5 0,-0.276 -0.224,-0.5 -0.5,-0.5z"
android:fillColor="@color/fluent_default_icon_tint"/>
</group>
<path
android:pathData="m11.568,12.296c-0.449,-0.466 -1.157,0.217 -0.675,0.651l1.912,1.846c7.457,7.199 9.861,9.522 7.457,7.199l2.404,2.323c0.45,0.435 1.125,-0.217 0.675,-0.652z"
android:strokeWidth="0.625337"
android:fillColor="@color/fluent_default_icon_tint"/>
</vector>