Skip to content

Commit

Permalink
Desktop icon creation can now handle grid positions (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Oct 12, 2019
1 parent 746d935 commit 9ee4aa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/adapters/ui/iconview.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ const createShortcuts = (root, readfile, writefile) => {
const contents = JSON.stringify(shortcuts || []);

return writefile(filename, contents)
.catch(() => 0);
.then(() => shortcuts.length - 1)
.catch(() => -1);
};

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

return copy(entry, dest)
.then(() => grid.move(ev, entry.filename))
.then(() => actions.reload())
.catch(error);
})
.then(key => grid.move(ev, key))
.then(() => actions.reload());

return {selected: -1};
Expand Down

0 comments on commit 9ee4aa5

Please sign in to comment.