mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Show max edits warning before editing.
Fixes #13428 Closes #13615 Signed-off-by: Arthur-GYT <a.gayot@ik.me>
This commit is contained in:
committed by
Cody Henthorne
parent
383f7556e3
commit
60a0565ba8
@@ -1557,12 +1557,6 @@ class ConversationFragment :
|
||||
return
|
||||
}
|
||||
|
||||
if (!MessageConstraintsUtil.isWithinMaxEdits(editMessage)) {
|
||||
Log.i(TAG, "Too many edits to the message")
|
||||
Dialogs.showAlertDialog(requireContext(), null, resources.getQuantityString(R.plurals.ConversationActivity_edit_message_too_many_edits, MessageConstraintsUtil.MAX_EDIT_COUNT, MessageConstraintsUtil.MAX_EDIT_COUNT))
|
||||
return
|
||||
}
|
||||
|
||||
if (!isValidEditMessageSend(editMessage, System.currentTimeMillis())) {
|
||||
Log.i(TAG, "Edit message no longer valid")
|
||||
val editDurationHours = getEditMessageThresholdHours()
|
||||
@@ -2320,6 +2314,13 @@ class ConversationFragment :
|
||||
}
|
||||
|
||||
private fun handleEditMessage(conversationMessage: ConversationMessage) {
|
||||
if (!MessageConstraintsUtil.isWithinMaxEdits(conversationMessage.messageRecord)) {
|
||||
Log.i(TAG, "Too many edits to the message")
|
||||
Dialogs.showAlertDialog(requireContext(), null, resources.getQuantityString(R.plurals.ConversationActivity_edit_message_too_many_edits, MessageConstraintsUtil.MAX_EDIT_COUNT, MessageConstraintsUtil.MAX_EDIT_COUNT))
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (isSearchRequested) {
|
||||
searchMenuItem?.collapseActionView()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user