Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 362350a5 authored by uabdullah's avatar uabdullah Committed by Copybara-Service
Browse files

Implement non-ui logic for delete/undo delete voicemails

When a voicemail is deleted we have to allow the user the option of cancelling the deleting of voicemail. This is done by showing the user a snack bar which when a user taps will prevent the voicemail from being deleted.
This CL only adds the underlying logic for the delete/undelete to take place via a ScheduledFuture, it does not fix all the UI issues that come with it, which will be sent in a follow up CL, issues such as:
-Updating the group label when a delete/undo happens
-Updating the entries above and below when a delete/undo happens
-Showing the empty view immediately when a user deletes a single voicemail
-Removing the empty view immediately when a user taps undo
-Updating tests

Bug: 69858266
Test: Manual
PiperOrigin-RevId: 188424489
Change-Id: Iecf5cb7be5b80fa5e91acaad3a7cc4a6c8702521
parent fd4c9f75
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -51,9 +51,6 @@
  <!-- Text for snackbar to undo a voicemail delete. [CHAR LIMIT=30] -->
  <string name="snackbar_voicemail_deleted">Voicemail deleted</string>

  <!-- Text for undo button in snackbar for voicemail deletion. [CHAR LIMIT=10] -->
  <string name="snackbar_voicemail_deleted_undo">UNDO</string>

  <!-- Title of the confirmation dialog for clearing the call log. [CHAR LIMIT=37]  -->
  <string name="clearCallLogConfirmation_title">Clear call history?</string>

+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ public class VoicemailPlaybackLayout extends LinearLayout
                  Snackbar.LENGTH_LONG)
              .setDuration(VOICEMAIL_DELETE_DELAY_MS)
              .setAction(
                  R.string.snackbar_voicemail_deleted_undo,
                  R.string.snackbar_undo,
                  new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
+2 −2
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ public class BlockNumberDialogFragment extends DialogFragment {
                };

            Snackbar.make(parentView, message, Snackbar.LENGTH_LONG)
                .setAction(R.string.block_number_undo, undoListener)
                .setAction(R.string.snackbar_undo, undoListener)
                .setActionTextColor(actionTextColor)
                .show();

@@ -295,7 +295,7 @@ public class BlockNumberDialogFragment extends DialogFragment {
                };

            Snackbar.make(parentView, message, Snackbar.LENGTH_LONG)
                .setAction(R.string.block_number_undo, undoListener)
                .setAction(R.string.snackbar_undo, undoListener)
                .setActionTextColor(actionTextColor)
                .show();

+0 −3
Original line number Diff line number Diff line
@@ -78,9 +78,6 @@
    <xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>unblocked
  </string>

  <!-- Text for undo button in snackbar for blocking/unblocking number. [CHAR LIMIT=10] -->
  <string name="block_number_undo">UNDO</string>

  <!-- Error toast message for when send to voicemail import fails. [CHAR LIMIT=40] -->
  <string name="send_to_voicemail_import_failed">Import failed</string>

+2 −0
Original line number Diff line number Diff line
@@ -19,4 +19,6 @@
  <string name="network_name_mobile">Mobile</string>
  <!-- Content description for the overflow menu button. [CHAR LIMIT=NONE] -->
  <string name="content_description_overflow">More options</string>
  <!-- Text for undo button in snackbar for voicemail deletion/blocking/unblocking number. [CHAR LIMIT=10] -->
  <string name="snackbar_undo">UNDO</string>
</resources>
Loading