This file contains hidden or 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
| class BaseController: UIViewController { | |
| private var controller: SummerPresenterController! | |
| func setPresenter(_ controller: SummerPresenterController) { | |
| controller.setViewProviderUnsafe(viewProvider: { [weak self] in | |
| return self | |
| }) | |
| self.controller = controller | |
| } |
This file contains hidden or 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
| { | |
| "id": "0", | |
| "items": [ | |
| { | |
| "count": 2.0, | |
| "product": { | |
| "id": "0", | |
| "name": "cucumber", | |
| "price": 50.0, | |
| "unit": "u." |
This file contains hidden or 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
| interface LoginByPhoneView { | |
| fun displayState(state: LoginByPhoneState) | |
| } | |
| enum class LoginByPhoneState { | |
| Request, | |
| Confirm | |
| } | |
| class LoginByPhonePresenter { |
This file contains hidden or 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
| interface LoginByPhoneView { | |
| var viewState: LoginByPhoneState | |
| } | |
| enum class LoginByPhoneState { | |
| Request, | |
| Confirm | |
| } | |
| class LoginByPhonePresenter : SummerViewModel<LoginByPhoneView>() { |
This file contains hidden or 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
| import io.ktor.client.request.HttpRequest | |
| import io.ktor.content.TextContent | |
| import java.util.* | |
| class CurlBuilder( | |
| request: HttpRequest, | |
| private val ignoreHeaders: List<String> = emptyList() | |
| ) { | |
| private val url: String = request.url.toString() | |
| private val method: String = request.method.value |
This file contains hidden or 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
| class BaseViewController: UIViewController { | |
| private var controller: ViewModelController! | |
| func setViewModel(_ controller: ViewModelController) { | |
| controller.setViewProviderUnsafe(viewProvider: { [weak self] in | |
| return self | |
| }) | |
| self.controller = controller | |
| } |
This file contains hidden or 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
| {"field1": 1, "field2": "123"} |
This file contains hidden or 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
| ["Ничего не произошло", "Произошло что-то не важное", "Что-то произошло, но это уже не важно", "Даже не знаю"] |