Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Discard cached suggestions when adding a share
The suggestions depend on the results returned by the server, but also
on the sharees already shared with. Due to that adding a share changes
the suggestions, so now the cached suggestions are discarded when a
share is added.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
  • Loading branch information
danxuliu committed Mar 21, 2018
commit 9a0fbe307d1eb8583117e5c38ec1f4ae2b5e0f9a
6 changes: 6 additions & 0 deletions core/js/sharedialogview.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@
$confirm.addClass('hidden');

this.model.addShare(s.item.value, {success: function() {
// Adding a share changes the suggestions.
self._lastSuggestions = undefined;

$(e.target).val('')
.attr('disabled', false);
$loading.addClass('hidden')
Expand Down Expand Up @@ -525,6 +528,9 @@
$loading.removeClass('inlineblock');
$confirm.removeClass('hidden');

// Adding a share changes the suggestions.
self._lastSuggestions = undefined;

$shareWithField.val('');
$shareWithField.prop('disabled', false);
$shareWithField.focus();
Expand Down