mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Clean code in ShareFileFragment
This commit is contained in:
parent
1fbc44b574
commit
e0813be81e
1 changed files with 1 additions and 24 deletions
|
@ -61,8 +61,7 @@ import java.util.ArrayList;
|
||||||
* Use the {@link ShareFileFragment#newInstance} factory method to
|
* Use the {@link ShareFileFragment#newInstance} factory method to
|
||||||
* create an instance of this fragment.
|
* create an instance of this fragment.
|
||||||
*/
|
*/
|
||||||
public class ShareFileFragment extends Fragment
|
public class ShareFileFragment extends Fragment {
|
||||||
implements GetShareWithUserAsyncTask.OnGetSharesWithUserTaskListener {
|
|
||||||
|
|
||||||
private static final String TAG = ShareFileFragment.class.getSimpleName();
|
private static final String TAG = ShareFileFragment.class.getSimpleName();
|
||||||
|
|
||||||
|
@ -201,28 +200,6 @@ public class ShareFileFragment extends Fragment
|
||||||
updateListOfUserGroups();
|
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() {
|
private void updateListOfUserGroups() {
|
||||||
// Update list of users/groups
|
// Update list of users/groups
|
||||||
mUserGroupsAdapter = new ShareUserListAdapter(getActivity().getApplicationContext(),
|
mUserGroupsAdapter = new ShareUserListAdapter(getActivity().getApplicationContext(),
|
||||||
|
|
Loading…
Reference in a new issue