mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-22 15:56:17 -04:00
fix "and 2 other files" div not cleared properly
This commit is contained in:
parent
6679ef7529
commit
c71bf456e3
2 changed files with 24 additions and 24 deletions
|
@ -695,20 +695,20 @@ class ReceiveDialog extends Dialog {
|
|||
}
|
||||
|
||||
_parseFileData(displayName, connectionHash, files, imagesOnly, totalSize) {
|
||||
if (files.length > 1) {
|
||||
let fileOther;
|
||||
if (files.length === 2) {
|
||||
fileOther = imagesOnly
|
||||
? Localization.getTranslation("dialogs.file-other-description-image")
|
||||
: Localization.getTranslation("dialogs.file-other-description-file");
|
||||
} else {
|
||||
fileOther = imagesOnly
|
||||
? Localization.getTranslation("dialogs.file-other-description-image-plural", null, {count: files.length - 1})
|
||||
: Localization.getTranslation("dialogs.file-other-description-file-plural", null, {count: files.length - 1});
|
||||
}
|
||||
this.$fileOther.innerText = fileOther;
|
||||
let fileOther = "";
|
||||
|
||||
if (files.length === 2) {
|
||||
fileOther = imagesOnly
|
||||
? Localization.getTranslation("dialogs.file-other-description-image")
|
||||
: Localization.getTranslation("dialogs.file-other-description-file");
|
||||
} else if (files.length >= 2) {
|
||||
fileOther = imagesOnly
|
||||
? Localization.getTranslation("dialogs.file-other-description-image-plural", null, {count: files.length - 1})
|
||||
: Localization.getTranslation("dialogs.file-other-description-file-plural", null, {count: files.length - 1});
|
||||
}
|
||||
|
||||
this.$fileOther.innerText = fileOther;
|
||||
|
||||
const fileName = files[0].name;
|
||||
const fileNameSplit = fileName.split('.');
|
||||
const fileExtension = '.' + fileNameSplit[fileNameSplit.length - 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue