Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Map cast inside XDG ResponseHandler #90

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package io.github.vinceglb.filekit.core.platform.xdg
import com.sun.jna.Native
import io.github.vinceglb.filekit.core.platform.PlatformFilePicker
import kotlinx.coroutines.CompletableDeferred
import org.freedesktop.dbus.DBusMap
import org.freedesktop.dbus.DBusMatchRule
import org.freedesktop.dbus.DBusPath
import org.freedesktop.dbus.Tuple
Expand Down Expand Up @@ -174,7 +173,7 @@ internal class XdgFilePickerPortal : PlatformFilePicker {
if (path == signal.path) {
val params = signal.parameters
val response = params[0] as UInt32
val results = params[1] as DBusMap<String, Variant<*>>
val results = params[1] as Map<String, Variant<*>>

if (response.toInt() == 0) {
val uris = (results["uris"]!!.value as List<String>).map { URI(it) }
Expand Down