MCPcopy Create free account
hub / github.com/M66B/FairEmail / undo

Method undo

app/src/main/java/eu/faircode/email/ActivityView.java:1521–1532  ·  view source on GitHub ↗
(String title, final Bundle args, final SimpleTask<Void> move, final SimpleTask<Void> show)

Source from the content-addressed store, hash-verified

1519 }
1520
1521 public void undo(String title, final Bundle args, final SimpleTask<Void> move, final SimpleTask<Void> show) {
1522 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
1523 int undo_timeout = prefs.getInt("undo_timeout", 5000);
1524
1525 if (undo_timeout == 0) {
1526 if (move != null) {
1527 move.execute(this, args, "undo:move");
1528 show.cancel(this);
1529 }
1530 } else
1531 undo(undo_timeout, title, args, move, show);
1532 }
1533
1534 private Snackbar undo(long undo_timeout, String title, final Bundle args, final SimpleTask move, final SimpleTask show) {
1535 if (drawerLayout == null || drawerLayout.getChildCount() == 0) {

Callers 2

onSentMessageMethod · 0.95
onExecutedMethod · 0.80

Calls 9

eMethod · 0.95
setSnackbarOptionsMethod · 0.95
setSnackbarLinesMethod · 0.95
setActionMethod · 0.80
addCallbackMethod · 0.80
getIntMethod · 0.45
executeMethod · 0.45
cancelMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected