if checkexistence removes the last item in the list, call toggleHeader
This commit is contained in:
parent
d660eda64c
commit
14f3d837f9
1 changed files with 5 additions and 0 deletions
|
@ -80,6 +80,7 @@ $(document).ready(function() {
|
|||
$copyBtn.attr('data-l10n-id', 'copyUrlFormButton');
|
||||
|
||||
const files = storage.files;
|
||||
console.log(files);
|
||||
if (files.length === 0) {
|
||||
toggleHeader();
|
||||
} else {
|
||||
|
@ -90,6 +91,7 @@ $(document).ready(function() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// copy link to clipboard
|
||||
$copyBtn.click(() => {
|
||||
// record copied event from success screen
|
||||
|
@ -341,6 +343,9 @@ $(document).ready(function() {
|
|||
}
|
||||
} else if (xhr.status === 404) {
|
||||
storage.remove(id);
|
||||
if (storage.numFiles === 0) {
|
||||
toggleHeader();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue