Skip to content

Instantly share code, notes, and snippets.

View AlexGladkov's full-sized avatar
🦆
Quack Quack

Alex AlexGladkov

🦆
Quack Quack
View GitHub Profile
import android.util.Log
import com.arellomobile.mvp.InjectViewState
import com.arellomobile.mvp.MvpPresenter
import com.sddhelp.R
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import ru.sddhelp.app.di.App
import ru.sddhelp.app.views.ProfileView
import ru.sddhelp.domain.models.Configuration
import ru.sddhelp.domain.models.ErrorResponse
import android.graphics.Bitmap
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import com.sddhelp.R
import kotlinx.android.synthetic.main.fragment_profile.*
//
// OtherApi.swift
// sddclient
//
// Created by Гладков Алексей on 26.06.18.
// Copyright © 2018 SDD LLC. All rights reserved.
//
import Foundation
import Alamofire
//
// SubscriptionsData.swift
// sddclient
//
// Created by Гладков Алексей on 10.04.18.
// Copyright © 2018 SDD LLC. All rights reserved.
//
import Foundation
import CoreData
//
// OrdersInteractor.swift
// sddclient
//
// Created by Гладков Алексей on 13.04.18.
// Copyright © 2018 SDD LLC. All rights reserved.
//
import Foundation
import UIKit
//
// OrdersViewController.swift
// sddclient
//
// Created by Гладков Алексей on 13.04.18.
// Copyright © 2018 SDD LLC. All rights reserved.
//
import UIKit
import UIKit
import PlaygroundSupport
@propertyWrapper
struct Wrapper<T> {
var wrappedValue: T {
didSet {
for item in Mirror(reflecting: self).children {
for itemItem in Mirror(reflecting: item.value).children {
// TODO: - Рефакторинг - разбить на более мелкие функции
func mainFlowController() -> UIViewController {
// NavigationBar setting
AppAppearance.applyAppearanceNavigationbBarStyle()
AppAppearance.applyAppearanceBarButtonItem()
// creates a Home tab
let homeVC: HomeViewController = ControllerFactory.createViewController()
let homeNav = LMNavigationController(rootViewController: homeVC)
homeNav.tabBarItem.title = L10n.ATestHome.title
@AlexGladkov
AlexGladkov / Coroutines + Rx.swift
Last active December 16, 2020 08:50
Coroutines + Rx (Multiplatform + iOS Native)
import LMCustomerSDK // Your Kotlin Multiplatform Library
import RxSwift
struct RxAsyncResult<ResultElement: AnyObject> {
#if targetEnvironment(simulator)
let async: AsyncResult<ResultElement>
#else
let async: AsyncResult
#endif
/// ConfigurationModel
data class ConfigurationModel(
val currentQuestId: Int,
val currentQuestPage: Int,
val boughtQuestIds: List<Int>
)
/// Configuration Local Data Source
interface ConfigurationLocalDataSource {
fun storeConfiguration(configurationModel: ConfigurationModel)