Fixed bug: toast message infinitely repeated
authorDavid A. Velasco <dvelasco@solidgear.es>
Fri, 30 Nov 2012 12:18:17 +0000 (13:18 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Fri, 30 Nov 2012 14:10:48 +0000 (15:10 +0100)
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
src/com/owncloud/android/ui/fragment/FileDetailFragment.java

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