refactor(output button): null safety

This commit is contained in:
aro 2023-01-05 12:58:58 +01:00
parent b2479abb09
commit 5d93b9ac9b

View file

@ -37,10 +37,10 @@ fun AddOutputButton(
Button( Button(
onClick = onClick =
{ {
val entry: WatcherEntry? = watcherManager.getFromId(currentClick) val entry: WatcherEntry = watcherManager.getFromId(currentClick)!!
showDirectoryPicker({ showDirectoryPicker({
Logger.info("Path: ${it.absolutePath}") Logger.info("Path: ${it.absolutePath}")
entry!!.map.add(it.toPath()) entry.outputs.add(it.toPath())
outputs.add(it.toPath()) outputs.add(it.toPath())
}, { }, {
Logger.info("No file selected.") Logger.info("No file selected.")