Clean code in ShareFileFragment

This commit is contained in:
masensio 2015-10-19 15:10:14 +02:00 committed by David A. Velasco
parent 1fbc44b574
commit e0813be81e

View file

@ -61,8 +61,7 @@ import java.util.ArrayList;
* Use the {@link ShareFileFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class ShareFileFragment extends Fragment
implements GetShareWithUserAsyncTask.OnGetSharesWithUserTaskListener {
public class ShareFileFragment extends Fragment {
private static final String TAG = ShareFileFragment.class.getSimpleName();
@ -201,28 +200,6 @@ public class ShareFileFragment extends Fragment
updateListOfUserGroups();
}
@Override
public void onGetDataShareWithFinish(RemoteOperationResult result) {
// Remove loading
((ShareActivity) getActivity()).dismissWaitingLoadDialog();
if (result != null && result.isSuccess()) {
// update local database
for (Object obj : result.getData()) {
if (((OCShare) obj).getShareType() == ShareType.USER ||
((OCShare) obj).getShareType() == ShareType.GROUP) {
mShares.add((OCShare) obj);
}
}
// Update list of users/groups
updateListOfUserGroups();
} else {
Toast.makeText(getActivity(), result.getLogMessage(), Toast.LENGTH_SHORT).show();
}
}
private void updateListOfUserGroups() {
// Update list of users/groups
mUserGroupsAdapter = new ShareUserListAdapter(getActivity().getApplicationContext(),