mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-08 05:26:10 +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())
|
||||
.setTitle("Leave 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();
|
||||
// this.apiHelper.apiService.leaveGroup(this.group.id).compose(apiHelper.configureApiCallObserver())
|
||||
// .subscribe(group -> {
|
||||
// getActivity().getSupportFragmentManager().beginTransaction().remove(PartyFragment.this).commit();
|
||||
// }, throwable -> {
|
||||
// });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue