Replace statement lambda with expression lambda
This commit is contained in:
parent
7b2d7e80a4
commit
26b938ce5b
@ -743,9 +743,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
|
|||||||
View parentLayout = findViewById(R.id.drawer_layout);
|
View parentLayout = findViewById(R.id.drawer_layout);
|
||||||
Snackbar snackbar = Snackbar.make(parentLayout, event.message, Snackbar.LENGTH_SHORT);
|
Snackbar snackbar = Snackbar.make(parentLayout, event.message, Snackbar.LENGTH_SHORT);
|
||||||
if(event.action != null) {
|
if(event.action != null) {
|
||||||
snackbar.setAction(getString(R.string.undo), v -> {
|
snackbar.setAction(getString(R.string.undo), v -> event.action.run());
|
||||||
event.action.run();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
snackbar.show();
|
snackbar.show();
|
||||||
}
|
}
|
||||||
|
@ -491,9 +491,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem
|
|||||||
View parentLayout = findViewById(R.id.drawer_layout);
|
View parentLayout = findViewById(R.id.drawer_layout);
|
||||||
Snackbar snackbar = Snackbar.make(parentLayout, event.message, Snackbar.LENGTH_SHORT);
|
Snackbar snackbar = Snackbar.make(parentLayout, event.message, Snackbar.LENGTH_SHORT);
|
||||||
if (event.action != null) {
|
if (event.action != null) {
|
||||||
snackbar.setAction(getString(R.string.undo), v -> {
|
snackbar.setAction(getString(R.string.undo), v -> event.action.run());
|
||||||
event.action.run();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
snackbar.show();
|
snackbar.show();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user