This commit is contained in:
LucasGGamerM
2023-01-05 13:24:09 -03:00
parent 77e7b136ff
commit 7ceff3eaa4
2 changed files with 12 additions and 5 deletions

View File

@@ -131,10 +131,15 @@ public class SettingsFragment extends MastodonToolbarFragment{
case NORD -> R.string.sk_color_palette_nord;
});
}));
items.add(new ButtonItem(R.string.sk_settings_publish_button_text, R.drawable.ic_fluent_send_24_regular, b->{
items.add(new ButtonItem(R.string.sk_settings_publish_button_text, R.drawable.ic_fluent_send_24_regular, b-> {
updatePublishText(b);
b.setOnClickListener(l->{
if (GlobalUserPreferences.relocatePublishButton) {
b.setOnClickListener(l -> {
Toast.makeText(getActivity(), R.string.sk_disable_relocate_publish_button_to_enable_customization,
Toast.LENGTH_LONG).show();
});
} else {
b.setOnClickListener(l -> {
FrameLayout inputWrap = new FrameLayout(getContext());
EditText input = new EditText(getContext());
input.setHint(R.string.publish);
@@ -154,9 +159,10 @@ public class SettingsFragment extends MastodonToolbarFragment{
GlobalUserPreferences.save();
updatePublishText(b);
})
.setNegativeButton(R.string.cancel, (d, which) -> {})
.setNegativeButton(R.string.cancel, (d, which) -> {
})
.show();
});
});}
}));
items.add(new SwitchItem(R.string.sk_settings_uniform_icon_for_notifications, R.drawable.ic_ntf_logo, GlobalUserPreferences.uniformNotificationIcon, i->{
GlobalUserPreferences.uniformNotificationIcon=i.checked;

View File

@@ -135,4 +135,5 @@
<string name="sk_no_image_desc">The included images have no description. Please consider adding one, to allow visually impaired people to participate.</string>
<string name="sk_emoji_recent">Recently used</string>
<string name="sk_clear_recent_emoji">Clear recently used emoji</string>
<string name="sk_disable_relocate_publish_button_to_enable_customization">Disable "Relocate publish button" to allow customization</string>
</resources>