mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-17 02:15:17 +08:00
Inject permission utils
This commit is contained in:
parent
6ec6d41aa9
commit
9e084ec372
@ -64,7 +64,9 @@ data class WidgetArgs(
|
|||||||
val urlParams: Map<String, String> = emptyMap()
|
val urlParams: Map<String, String> = emptyMap()
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
|
||||||
class WidgetFragment @Inject constructor() :
|
class WidgetFragment @Inject constructor(
|
||||||
|
private val permissionUtils: WebviewPermissionUtils
|
||||||
|
) :
|
||||||
VectorBaseFragment<FragmentRoomWidgetBinding>(),
|
VectorBaseFragment<FragmentRoomWidgetBinding>(),
|
||||||
WebViewEventListener,
|
WebViewEventListener,
|
||||||
WebChromeEventListener,
|
WebChromeEventListener,
|
||||||
@ -72,7 +74,6 @@ class WidgetFragment @Inject constructor() :
|
|||||||
|
|
||||||
private val fragmentArgs: WidgetArgs by args()
|
private val fragmentArgs: WidgetArgs by args()
|
||||||
private val viewModel: WidgetViewModel by activityViewModel()
|
private val viewModel: WidgetViewModel by activityViewModel()
|
||||||
private val permissionUtils = WebviewPermissionUtils()
|
|
||||||
|
|
||||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentRoomWidgetBinding {
|
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentRoomWidgetBinding {
|
||||||
return FragmentRoomWidgetBinding.inflate(inflater, container, false)
|
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.R
|
||||||
import im.vector.app.core.utils.checkPermissions
|
import im.vector.app.core.utils.checkPermissions
|
||||||
import java.lang.NullPointerException
|
import java.lang.NullPointerException
|
||||||
|
import javax.inject.Inject
|
||||||
|
|
||||||
class WebviewPermissionUtils {
|
class WebviewPermissionUtils @Inject constructor() {
|
||||||
|
|
||||||
private var permissionRequest: PermissionRequest? = null
|
private var permissionRequest: PermissionRequest? = null
|
||||||
private var selectedPermissions = listOf<String>()
|
private var selectedPermissions = listOf<String>()
|
||||||
|
Loading…
Reference in New Issue
Block a user