From 90404626d927ce26d2e016f3dfcd677ffccfcde7 Mon Sep 17 00:00:00 2001 From: euxane Date: Wed, 18 Sep 2024 23:41:13 +0200 Subject: status/nodes: remove deprecated factory call --- .../org/pacien/tincapp/activities/status/nodes/NodeListFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeListFragment.kt b/app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeListFragment.kt index 8c0ef88..b4ec0fb 100644 --- a/app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeListFragment.kt +++ b/app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeListFragment.kt @@ -18,12 +18,12 @@ package org.pacien.tincapp.activities.status.nodes -import androidx.lifecycle.ViewModelProviders import android.os.Bundle import androidx.appcompat.app.AlertDialog import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.lifecycle.ViewModelProvider import org.pacien.tincapp.R import org.pacien.tincapp.activities.BaseFragment import org.pacien.tincapp.commands.Tinc @@ -42,7 +42,7 @@ class NodeListFragment : BaseFragment() { private val vpnService = TincVpnService private val tincCtl = Tinc private val netName by lazy { vpnService.getCurrentNetName()!! } - private val nodeListViewModel by lazy { ViewModelProviders.of(this).get(NodeListViewModel::class.java) } + private val nodeListViewModel by lazy { ViewModelProvider(this).get(NodeListViewModel::class.java) } private val nodeListAdapter by lazy { NodeInfoArrayAdapter(requireContext(), this::onItemClick) } private lateinit var statusNodeListFragmentBinding: StatusNodeListFragmentBinding -- cgit v1.2.3