Skip to content

Commit 9ee4aa5

Browse files
committed
Desktop icon creation can now handle grid positions (#51)
1 parent 746d935 commit 9ee4aa5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/adapters/ui/iconview.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ const createShortcuts = (root, readfile, writefile) => {
288288
const contents = JSON.stringify(shortcuts || []);
289289

290290
return writefile(filename, contents)
291-
.catch(() => 0);
291+
.then(() => shortcuts.length - 1)
292+
.catch(() => -1);
292293
};
293294

294295
const add = entry => read(root)
@@ -468,9 +469,11 @@ export class DesktopIconView extends EventEmitter {
468469
}
469470

470471
return copy(entry, dest)
472+
.then(() => grid.move(ev, entry.filename))
471473
.then(() => actions.reload())
472474
.catch(error);
473475
})
476+
.then(key => grid.move(ev, key))
474477
.then(() => actions.reload());
475478

476479
return {selected: -1};

0 commit comments

Comments
 (0)