mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 20:36:44 +00:00
better handling of multiple verification file drop
This commit is contained in:
parent
4cb2e1ef9f
commit
c034dbe89e
1 changed files with 14 additions and 10 deletions
|
@ -291,9 +291,7 @@ public class AppController implements Initializable {
|
||||||
Dragboard db = event.getDragboard();
|
Dragboard db = event.getDragboard();
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
if(db.hasFiles()) {
|
if(db.hasFiles()) {
|
||||||
for(File file : db.getFiles()) {
|
openFiles(db.getFiles());
|
||||||
openFile(file);
|
|
||||||
}
|
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
event.setDropCompleted(success);
|
event.setDropCompleted(success);
|
||||||
|
@ -998,13 +996,19 @@ public class AppController implements Initializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile(File file) {
|
public void openFiles(List<File> files) {
|
||||||
if(isWalletFile(file)) {
|
boolean verifyOpened = false;
|
||||||
openWalletFile(file, true);
|
for(File file : files) {
|
||||||
} else if(isVerifyDownloadFile(file)) {
|
if(isWalletFile(file)) {
|
||||||
verifyDownload(new ActionEvent(file, rootStack));
|
openWalletFile(file, true);
|
||||||
} else {
|
} else if(isVerifyDownloadFile(file)) {
|
||||||
openTransactionFile(file);
|
if(!verifyOpened) {
|
||||||
|
verifyDownload(new ActionEvent(file, rootStack));
|
||||||
|
verifyOpened = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
openTransactionFile(file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue