Format code and merge main

This commit is contained in:
M M Arif 2023-04-13 01:45:53 +05:00
parent 8fd6ede304
commit 6fc664a418
2 changed files with 20 additions and 20 deletions

View File

@ -172,30 +172,30 @@ public class SettingsGeneralActivity extends BaseActivity {
// enable drafts deletion
viewBinding.commentsDeletionSwitch.setChecked(
tinyDB.getBoolean("draftsCommentsDeletionEnabled", true));
tinyDB.getBoolean("draftsCommentsDeletionEnabled", true));
// delete comments on submit switcher
viewBinding.commentsDeletionSwitch.setOnCheckedChangeListener(
(buttonView, isChecked) -> {
tinyDB.putBoolean("draftsCommentsDeletionEnabled", isChecked);
Toasty.success(appCtx, getResources().getString(R.string.settingsSave));
});
(buttonView, isChecked) -> {
tinyDB.putBoolean("draftsCommentsDeletionEnabled", isChecked);
Toasty.success(appCtx, getResources().getString(R.string.settingsSave));
});
viewBinding.enableDraftsCommentsDeletion.setOnClickListener(
v ->
viewBinding.commentsDeletionSwitch.setChecked(
!viewBinding.commentsDeletionSwitch.isChecked()));
v ->
viewBinding.commentsDeletionSwitch.setChecked(
!viewBinding.commentsDeletionSwitch.isChecked()));
// enable drafts deletion
// crash reports switcher
viewBinding.crashReportsSwitch.setOnCheckedChangeListener(
(buttonView, isChecked) -> {
tinyDB.putBoolean("crashReportingEnabled", isChecked);
Toasty.success(appCtx, getResources().getString(R.string.settingsSave));
});
(buttonView, isChecked) -> {
tinyDB.putBoolean("crashReportingEnabled", isChecked);
Toasty.success(appCtx, getResources().getString(R.string.settingsSave));
});
viewBinding.enableSendReports.setOnClickListener(
v ->
viewBinding.crashReportsSwitch.setChecked(
!viewBinding.crashReportsSwitch.isChecked()));
v ->
viewBinding.crashReportsSwitch.setChecked(
!viewBinding.crashReportsSwitch.isChecked()));
// crash reports switcher
}

View File

@ -62,7 +62,7 @@ public class SettingsFragment extends Fragment {
v1 -> startActivity(new Intent(ctx, SettingsAppearanceActivity.class)));
fragmentSettingsBinding.codeEditorFrame.setOnClickListener(
v1 -> startActivity(new Intent(ctx, SettingsAppearanceActivity.class)));
v1 -> startActivity(new Intent(ctx, SettingsAppearanceActivity.class)));
fragmentSettingsBinding.securityFrame.setOnClickListener(
v1 -> startActivity(new Intent(ctx, SettingsSecurityActivity.class)));
@ -131,10 +131,10 @@ public class SettingsFragment extends Fragment {
});
aboutAppDialogBinding.feedback.setOnClickListener(
v14 -> {
AppUtil.openUrlInBrowser(
requireContext(), getResources().getString(R.string.feedbackLink));
});
v14 -> {
AppUtil.openUrlInBrowser(
requireContext(), getResources().getString(R.string.feedbackLink));
});
if (AppUtil.isPro(requireContext())) {
aboutAppDialogBinding.layoutFrame1.setVisibility(View.GONE);