mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
oeuf
This commit is contained in:
parent
aa6dab07cb
commit
84caa633a3
@ -88,27 +88,28 @@ public class MorePreferencesFragment extends BasePreferencesFragment {
|
|||||||
startActivityForResult(new Intent(getContext(), Login.class), Constants.LOGIN_RESULT_CODE);
|
startActivityForResult(new Intent(getContext(), Login.class), Constants.LOGIN_RESULT_CODE);
|
||||||
return true;
|
return true;
|
||||||
}));
|
}));
|
||||||
if (Utils.dataBox.getAllCookies().size() > 0) {
|
}
|
||||||
accountCategory.addPreference(getPreference(R.string.remove_all_acc, null, R.drawable.ic_delete, preference -> {
|
|
||||||
if (getContext() == null) return false;
|
if (Utils.dataBox.getAllCookies().size() > 0) {
|
||||||
new AlertDialog.Builder(getContext())
|
accountCategory.addPreference(getPreference(R.string.remove_all_acc, null, R.drawable.ic_delete, preference -> {
|
||||||
.setTitle(R.string.logout)
|
if (getContext() == null) return false;
|
||||||
.setMessage(R.string.remove_all_acc_warning)
|
new AlertDialog.Builder(getContext())
|
||||||
.setPositiveButton(R.string.yes, (dialog, which) -> {
|
.setTitle(R.string.logout)
|
||||||
CookieUtils.setupCookies("REMOVE");
|
.setMessage(R.string.remove_all_acc_warning)
|
||||||
shouldRecreate();
|
.setPositiveButton(R.string.yes, (dialog, which) -> {
|
||||||
Toast.makeText(requireContext(), R.string.logout_success, Toast.LENGTH_SHORT).show();
|
CookieUtils.setupCookies("REMOVE");
|
||||||
settingsHelper.putString(Constants.COOKIE, "");
|
shouldRecreate();
|
||||||
})
|
Toast.makeText(requireContext(), R.string.logout_success, Toast.LENGTH_SHORT).show();
|
||||||
.setNegativeButton(R.string.cancel, null)
|
settingsHelper.putString(Constants.COOKIE, "");
|
||||||
.show();
|
})
|
||||||
return true;
|
.setNegativeButton(R.string.cancel, null)
|
||||||
}));
|
.show();
|
||||||
}
|
return true;
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
final PreferenceCategory generalCategory = new PreferenceCategory(requireContext());
|
final PreferenceCategory generalCategory = new PreferenceCategory(requireContext());
|
||||||
generalCategory.setTitle("General");
|
generalCategory.setTitle(R.string.pref_category_general);
|
||||||
generalCategory.setIconSpaceReserved(false);
|
generalCategory.setIconSpaceReserved(false);
|
||||||
screen.addPreference(generalCategory);
|
screen.addPreference(generalCategory);
|
||||||
if (isLoggedIn) {
|
if (isLoggedIn) {
|
||||||
|
Loading…
Reference in New Issue
Block a user