Skip to content

Instantly share code, notes, and snippets.

@VovaStelmashchuk
Created September 12, 2019 17:15
Show Gist options
  • Save VovaStelmashchuk/d20214252357a4bfb6f55a1ab9e539ae to your computer and use it in GitHub Desktop.
Save VovaStelmashchuk/d20214252357a4bfb6f55a1ab9e539ae to your computer and use it in GitHub Desktop.
public class MainView$$State extends MvpViewState implements MainView {
@Override
public void printLog(String message) {
PrintLogCommand printLogCommand = new PrintLogCommand(message);
viewCommands.beforeApply(printLogCommand);
if (hasNotView()) {
return;
}
for (MainView view : views) {
view.printLog(message);
}
viewCommands.afterApply(printLogCommand);
}
public class PrintLogCommand extends ViewCommand {
public final String message;
PrintLogCommand(String message) {
super("printLog", AddToEndStrategy.class);
this.message = message;
}
@Override
public void apply(MainView mvpView) {
mvpView.printLog(message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment