mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Inject permission utils
This commit is contained in:
parent
6ec6d41aa9
commit
9e084ec372
2 changed files with 5 additions and 3 deletions
|
@ -64,7 +64,9 @@ data class WidgetArgs(
|
|||
val urlParams: Map<String, String> = emptyMap()
|
||||
) : Parcelable
|
||||
|
||||
class WidgetFragment @Inject constructor() :
|
||||
class WidgetFragment @Inject constructor(
|
||||
private val permissionUtils: WebviewPermissionUtils
|
||||
) :
|
||||
VectorBaseFragment<FragmentRoomWidgetBinding>(),
|
||||
WebViewEventListener,
|
||||
WebChromeEventListener,
|
||||
|
@ -72,7 +74,6 @@ class WidgetFragment @Inject constructor() :
|
|||
|
||||
private val fragmentArgs: WidgetArgs by args()
|
||||
private val viewModel: WidgetViewModel by activityViewModel()
|
||||
private val permissionUtils = WebviewPermissionUtils()
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentRoomWidgetBinding {
|
||||
return FragmentRoomWidgetBinding.inflate(inflater, container, false)
|
||||
|
|
|
@ -26,8 +26,9 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.utils.checkPermissions
|
||||
import java.lang.NullPointerException
|
||||
import javax.inject.Inject
|
||||
|
||||
class WebviewPermissionUtils {
|
||||
class WebviewPermissionUtils @Inject constructor() {
|
||||
|
||||
private var permissionRequest: PermissionRequest? = null
|
||||
private var selectedPermissions = listOf<String>()
|
||||
|
|
Loading…
Reference in a new issue