Skip to content

Commit

Permalink
Injection
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-muszel committed Jan 9, 2020
1 parent 595f5fd commit 7d561c1
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package ar.com.wolox.wolmo.core.fragment

import android.app.Dialog
import android.content.Context
import android.content.DialogInterface
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
Expand All @@ -38,6 +39,7 @@ import androidx.fragment.app.FragmentManager
import ar.com.wolox.wolmo.core.permission.PermissionManager
import ar.com.wolox.wolmo.core.presenter.BasePresenter
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import dagger.android.support.AndroidSupportInjection
import dagger.android.support.DaggerAppCompatDialogFragment
import javax.inject.Inject

Expand All @@ -58,6 +60,11 @@ abstract class WolmoBottomSheetDialogFragment<P : BasePresenter<*>> : BottomShee
val presenter: P
get() = fragmentHandler.presenter

override fun onAttach(context: Context) {
AndroidSupportInjection.inject(this)
super.onAttach(context)
}

override fun onCreateDialog(savedInstanceState: Bundle?) = super.onCreateDialog(savedInstanceState).apply {
window?.run {
requestFeature(Window.FEATURE_NO_TITLE)
Expand Down

0 comments on commit 7d561c1

Please sign in to comment.