mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
parent
c97d298166
commit
83d83e0812
4 changed files with 34 additions and 1 deletions
|
@ -5,6 +5,7 @@ Features ✨:
|
||||||
-
|
-
|
||||||
|
|
||||||
Improvements 🙌:
|
Improvements 🙌:
|
||||||
|
- Show confirmation dialog before deleting a message (#967)
|
||||||
- Improve navigation to the timeline (#789, #862)
|
- Improve navigation to the timeline (#789, #862)
|
||||||
- Improve network detection. It is now based on the sync request status (#873, #882)
|
- Improve network detection. It is now based on the sync request status (#873, #882)
|
||||||
|
|
||||||
|
|
|
@ -1108,7 +1108,14 @@ class RoomDetailFragment @Inject constructor(
|
||||||
showSnackWithMessage(getString(R.string.copied_to_clipboard), Snackbar.LENGTH_SHORT)
|
showSnackWithMessage(getString(R.string.copied_to_clipboard), Snackbar.LENGTH_SHORT)
|
||||||
}
|
}
|
||||||
is EventSharedAction.Delete -> {
|
is EventSharedAction.Delete -> {
|
||||||
roomDetailViewModel.handle(RoomDetailAction.RedactAction(action.eventId, context?.getString(R.string.event_redacted_by_user_reason)))
|
val layout = requireActivity().layoutInflater.inflate(R.layout.dialog_delete_event, null)
|
||||||
|
AlertDialog.Builder(requireActivity())
|
||||||
|
.setView(layout)
|
||||||
|
.setPositiveButton(R.string.delete) { _, _ ->
|
||||||
|
roomDetailViewModel.handle(RoomDetailAction.RedactAction(action.eventId, context?.getString(R.string.event_redacted_by_user_reason)))
|
||||||
|
}
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.show()
|
||||||
}
|
}
|
||||||
is EventSharedAction.Share -> {
|
is EventSharedAction.Share -> {
|
||||||
// TODO current data communication is too limited
|
// TODO current data communication is too limited
|
||||||
|
|
21
vector/src/main/res/layout/dialog_delete_event.xml
Normal file
21
vector/src/main/res/layout/dialog_delete_event.xml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/layout_root"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="?dialogPreferredPadding"
|
||||||
|
android:paddingLeft="?dialogPreferredPadding"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
android:paddingEnd="?dialogPreferredPadding"
|
||||||
|
android:paddingRight="?dialogPreferredPadding"
|
||||||
|
android:paddingBottom="12dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/deleteEventConfirmationText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/delete_event_dialog_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -19,6 +19,10 @@
|
||||||
|
|
||||||
<!-- END Strings added by Benoit -->
|
<!-- END Strings added by Benoit -->
|
||||||
|
|
||||||
|
<!-- BEGIN Strings added by Onuray -->
|
||||||
|
<string name="delete_event_dialog_content">Delete message?</string>
|
||||||
|
<!-- END Strings added by Onuray -->
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN Strings added by Others -->
|
<!-- BEGIN Strings added by Others -->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue