mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
Leave Party Dialog working
This commit is contained in:
parent
437288ab1c
commit
3c8664def8
1 changed files with 9 additions and 5 deletions
|
|
@ -163,12 +163,16 @@ public class PartyFragment extends BaseMainFragment {
|
||||||
new AlertDialog.Builder(viewPager.getContext())
|
new AlertDialog.Builder(viewPager.getContext())
|
||||||
.setTitle("Leave Party")
|
.setTitle("Leave Party")
|
||||||
.setMessage("Are you sure you want to leave the party?")
|
.setMessage("Are you sure you want to leave the party?")
|
||||||
|
.setPositiveButton(viewPager.getContext().getString(R.string.yes), (dialog, which) -> this.apiHelper.apiService.leaveGroup(this.group.id)
|
||||||
|
.compose(apiHelper.configureApiCallObserver())
|
||||||
|
.subscribe(group -> {
|
||||||
|
getActivity().getSupportFragmentManager().beginTransaction().remove(PartyFragment.this).commit();
|
||||||
|
}, throwable -> {
|
||||||
|
}))
|
||||||
|
.setNegativeButton(viewPager.getContext().getString(R.string.no), (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
})
|
||||||
.show();
|
.show();
|
||||||
// this.apiHelper.apiService.leaveGroup(this.group.id).compose(apiHelper.configureApiCallObserver())
|
|
||||||
// .subscribe(group -> {
|
|
||||||
// getActivity().getSupportFragmentManager().beginTransaction().remove(PartyFragment.this).commit();
|
|
||||||
// }, throwable -> {
|
|
||||||
// });
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue