Fixed bug: toast message infinitely repeated

This commit is contained in:
David A. Velasco 2012-11-30 13:18:17 +01:00
parent 3ef64834e9
commit 9f8814c557
2 changed files with 2 additions and 0 deletions

View file

@ -880,6 +880,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
}
setSupportProgressBarIndeterminateVisibility(inProgress);
removeStickyBroadcast(intent);
}

View file

@ -733,6 +733,7 @@ public class FileDetailFragment extends SherlockFragment implements
String newName = (new File(uploadRemotePath)).getName();
Toast msg = Toast.makeText(getActivity().getApplicationContext(), String.format(getString(R.string.filedetails_renamed_in_upload_msg), newName), Toast.LENGTH_LONG);
msg.show();
getSherlockActivity().removeStickyBroadcast(intent); // not the best place to do this; a small refactorization of BroadcastReceivers should be done
}
updateFileDetails(false); // it updates the buttons; must be called although !uploadWasFine; interrupted uploads still leave an incomplete file in the server
}