Created
September 12, 2019 17:15
-
-
Save VovaStelmashchuk/d20214252357a4bfb6f55a1ab9e539ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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