Fix sull'eliminazione di un documento interno
This commit is contained in:
parent
9b823fdca8
commit
62dc62aa99
@ -280,6 +280,12 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
this.closeEdit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDocDeleted() {
|
||||
this.binding.closeActivityFab.close(true);
|
||||
this.closeEdit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDocExported() {
|
||||
runOnUiThread(() -> {
|
||||
|
||||
@ -115,14 +115,11 @@ public class DocInterniEditFormViewModel {
|
||||
|
||||
public void deleteDocument() {
|
||||
this.sendOnLoadingStarted();
|
||||
docInterniRESTConsumer.saveDoc(this.getSaveDto(), () -> {
|
||||
SqlMtbColt document = this.getDocument();
|
||||
document.setCodDtip(document.getCodDtipProvv());
|
||||
mtbColtRepository.update(document, doc -> {
|
||||
mtbColtRepository.delete(document, () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
this.listener.onDocExported();
|
||||
this.listener.onDocDeleted();
|
||||
}, this::sendError);
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void holdDocument() {
|
||||
@ -341,6 +338,8 @@ public class DocInterniEditFormViewModel {
|
||||
|
||||
void onDocumentHoldRequest();
|
||||
|
||||
void onDocDeleted();
|
||||
|
||||
void onDocExported();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user