mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Using collect() instead of java16-only toList() to fix crash
This commit is contained in:
parent
48919bddcd
commit
3baa9fa14e
@ -22,6 +22,7 @@ import org.kde.kdeconnect.Device
|
||||
import org.kde.kdeconnect.KdeConnect
|
||||
import org.kde.kdeconnect_tp.R
|
||||
import org.kde.kdeconnect_tp.databinding.WidgetRemoteCommandPluginDialogBinding
|
||||
import java.util.stream.Collectors
|
||||
import kotlin.streams.toList
|
||||
|
||||
class RunCommandWidgetConfigActivity : AppCompatActivity() {
|
||||
@ -44,7 +45,7 @@ class RunCommandWidgetConfigActivity : AppCompatActivity() {
|
||||
val binding = WidgetRemoteCommandPluginDialogBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
val pairedDevices = KdeConnect.getInstance().devices.values.stream().filter(Device::isPaired).toList()
|
||||
val pairedDevices = KdeConnect.getInstance().devices.values.stream().filter(Device::isPaired).collect(Collectors.toList());
|
||||
|
||||
binding.runCommandsDeviceList.adapter = object : ArrayAdapter<Device>(this, 0, pairedDevices) {
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
|
Loading…
x
Reference in New Issue
Block a user