Skip to content

Commit

Permalink
🔀 Merge pull request #90 from zacharee/fix-class-cast
Browse files Browse the repository at this point in the history
Fix Map cast inside XDG ResponseHandler
  • Loading branch information
vinceglb authored Aug 19, 2024
2 parents 47208b3 + 8de79dd commit 4785a90
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit 4785a90

Please # to comment.