use of net.iGap.request.RequestUserProfileGetSelfRemove in project iGap-Android by KianIranian-STDG.
the class FragmentPrivacyAndSecurity method onViewCreated.
@Override
public void onViewCreated(@NotNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
privacyAndSecurityToolbar = new Toolbar(getContext());
privacyAndSecurityToolbar.setBackIcon(new BackDrawable(false));
privacyAndSecurityToolbar.setTitle(getString(R.string.st_title_Privacy_Security));
privacyAndSecurityToolbar.setListener(i -> {
switch(i) {
case -1:
popBackStackFragment();
break;
}
});
fragmentPrivacyAndSecurityBinding.fpsLayoutToolbar.addView(privacyAndSecurityToolbar, LayoutCreator.createLinear(LayoutCreator.MATCH_PARENT, LayoutCreator.dp(56), Gravity.TOP));
new RequestUserContactsGetBlockedList().userContactsGetBlockedList();
RealmPrivacy.getUpdatePrivacyFromServer();
fragmentPrivacyAndSecurityBinding.parentPrivacySecurity.setOnClickListener(view1 -> {
});
new RequestUserProfileGetSelfRemove().userProfileGetSelfRemove();
fragmentPrivacyAndSecurityViewModel.goToBlockedUserPage.observe(getViewLifecycleOwner(), go -> {
if (getActivity() != null && go != null && go) {
new HelperFragment(getActivity().getSupportFragmentManager(), new FragmentBlockedUser()).setReplace(false).load();
}
});
fragmentPrivacyAndSecurityViewModel.goToPassCodePage.observe(getViewLifecycleOwner(), go -> {
if (getActivity() != null && go != null && go) {
new HelperFragment(getActivity().getSupportFragmentManager(), new FragmentPassCode()).setReplace(false).load();
}
});
fragmentPrivacyAndSecurityViewModel.goToSecurityPage.observe(getViewLifecycleOwner(), go -> {
if (getActivity() != null && go != null && go) {
new HelperFragment(getActivity().getSupportFragmentManager(), new FragmentSecurity()).setReplace(false).load();
}
});
fragmentPrivacyAndSecurityViewModel.goToActiveSessionsPage.observe(getViewLifecycleOwner(), go -> {
if (getActivity() != null && go != null && go) {
new HelperFragment(getActivity().getSupportFragmentManager(), new FragmentActiveSessions()).setReplace(false).load();
}
});
}
Aggregations