- public void showWaitingLoadDialog() {
- // Construct dialog
- LoadingDialog loading = new LoadingDialog(
- getResources().getString(R.string.common_loading));
- FragmentManager fm = getSupportFragmentManager();
- FragmentTransaction ft = fm.beginTransaction();
- loading.show(ft, DIALOG_WAIT_LOAD_DATA);
+ @Override
+ public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
+ super.onRemoteOperationFinish(operation, result);
+ if (operation instanceof UnshareOperation ||
+ operation instanceof CreateShareWithShareeOperation) {
+
+ if (result.isSuccess()) {
+ refreshUsersInLists();
+ if (operation instanceof CreateShareWithShareeOperation) {
+ // Clean action
+ getIntent().setAction(null);
+ }
+ } else {
+ Toast.makeText(
+ this,
+ ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+ Toast.LENGTH_LONG
+ ).show();
+ }