Commit 8cee5e74 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

test snackbar pipeline

parent faa2c7ce
...@@ -14,9 +14,11 @@ import com.biganto.visual.roompark.R ...@@ -14,9 +14,11 @@ import com.biganto.visual.roompark.R
import com.biganto.visual.roompark.base.ICollapsingToolBar import com.biganto.visual.roompark.base.ICollapsingToolBar
import com.biganto.visual.roompark.base.RoomParkMainActivity import com.biganto.visual.roompark.base.RoomParkMainActivity
import com.biganto.visual.roompark.conductor.mosby.mvi.BigantoMviController import com.biganto.visual.roompark.conductor.mosby.mvi.BigantoMviController
import com.biganto.visual.roompark.di.dagger.ActivityModule
import com.biganto.visual.roompark.view_utils.snackbar.ISnackBarProvider import com.biganto.visual.roompark.view_utils.snackbar.ISnackBarProvider
import com.hannesdorfmann.mosby3.mvi.MviBasePresenter import com.hannesdorfmann.mosby3.mvi.MviBasePresenter
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import timber.log.Timber
/** /**
* Created by Vladislav Bogdashkin on 28.05.2018. * Created by Vladislav Bogdashkin on 28.05.2018.
...@@ -33,8 +35,6 @@ abstract class BigantoBaseController<VS : BigantoBaseViewState,V: BigantoBaseCon ...@@ -33,8 +35,6 @@ abstract class BigantoBaseController<VS : BigantoBaseViewState,V: BigantoBaseCon
abstract override fun createPresenter(): P abstract override fun createPresenter(): P
abstract fun getSnackBar(): ISnackBarProvider
@LayoutRes @LayoutRes
protected abstract fun getLayoutId(): Int protected abstract fun getLayoutId(): Int
...@@ -68,8 +68,12 @@ abstract class BigantoBaseController<VS : BigantoBaseViewState,V: BigantoBaseCon ...@@ -68,8 +68,12 @@ abstract class BigantoBaseController<VS : BigantoBaseViewState,V: BigantoBaseCon
val view = inflater.inflate(getLayoutId(), container, false) val view = inflater.inflate(getLayoutId(), container, false)
// instantiate the view // instantiate the view
ButterKnife.bind(this, view) ButterKnife.bind(this, view)
toolBar= activity as RoomParkMainActivity Timber.d(" ACTIVITY IS : ${activity?.localClassName} / ${activity?.localClassName}")
snackbar= getSnackBar() (activity as RoomParkMainActivity).let{
snackbar = ActivityModule.provideSnackBar(it)
toolBar = it
}
return view return view
} }
......
package com.biganto.visual.roompark.presentation.screen.splash package com.biganto.visual.roompark.presentation.screen.splash
import DaggerSplashScreenComponent import DaggerSplashScreenComponent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.biganto.visual.roompark.R import com.biganto.visual.roompark.R
import com.biganto.visual.roompark.base.RoomParkApplication import com.biganto.visual.roompark.base.RoomParkApplication
import com.biganto.visual.roompark.base.RoomParkMainActivity
import com.biganto.visual.roompark.conductor.BigantoBaseController import com.biganto.visual.roompark.conductor.BigantoBaseController
import com.biganto.visual.roompark.view_utils.snackbar.SnackBarProvider import com.google.android.material.snackbar.Snackbar
/** /**
* Created by Vladislav Bogdashkin on 30.09.2019. * Created by Vladislav Bogdashkin on 30.09.2019.
...@@ -16,16 +20,20 @@ class SplashScreenController : ...@@ -16,16 +20,20 @@ class SplashScreenController :
, SplashScreenPresenter>() , SplashScreenPresenter>()
, SplashScreen { , SplashScreen {
// @Inject lateinit var rpActivity: RoomParkMainActivity
// lateinit var rpActivity:RoomParkMainActivity
fun getComponent() = DaggerSplashScreenComponent fun getComponent() = DaggerSplashScreenComponent
.factory() .factory()
.create(RoomParkApplication.component,this) .create(RoomParkApplication.component,this)
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup): View {
val v = super.onCreateView(inflater, container)
rpActivity = activity as RoomParkMainActivity
snackbar.showSnackBar("AZZZA", Snackbar.LENGTH_LONG)
return v
}
override fun getSnackBar() = SnackBarProvider(activity!!)//getComponent().snack(activity)
override fun render(viewState: SplashScreenViewState) { override fun render(viewState: SplashScreenViewState) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
......
...@@ -42,6 +42,8 @@ interface SplashScreenComponent { ...@@ -42,6 +42,8 @@ interface SplashScreenComponent {
} }
val presenter: SplashScreenPresenter val presenter: SplashScreenPresenter
// val roomParkActivity: RoomParkMainActivity
// val snackBar : ISnackBarProvider
} }
......
...@@ -13,7 +13,6 @@ import javax.inject.Inject ...@@ -13,7 +13,6 @@ import javax.inject.Inject
*/ */
class SnackBarProvider @Inject constructor(val activity: Activity) : ISnackBarProvider { class SnackBarProvider @Inject constructor(val activity: Activity) : ISnackBarProvider {
override val isRootBounded: Boolean override val isRootBounded: Boolean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment