Better code style for hiding language button
This commit is contained in:
parent
e3df5ce0a8
commit
87cbffcb06
1 changed files with 10 additions and 11 deletions
|
@ -919,18 +919,17 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||||
|
|
||||||
|
|
||||||
languageButton = wrap.findViewById(R.id.language_btn);
|
languageButton = wrap.findViewById(R.id.language_btn);
|
||||||
|
languageButton.setOnClickListener(v->showLanguageAlert());
|
||||||
|
languageButton.setOnLongClickListener(v->{
|
||||||
|
if(!getLocalPrefs().bottomEncoding){
|
||||||
|
getLocalPrefs().bottomEncoding=true;
|
||||||
|
getLocalPrefs().save();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
if(instance.isIceshrimpJs())
|
if(instance.isIceshrimpJs())
|
||||||
languageButton.setVisibility(View.GONE);
|
languageButton.setVisibility(View.GONE); // hide language selector on Iceshrimp-JS because the feature is not supported
|
||||||
else {
|
|
||||||
languageButton.setOnClickListener(v->showLanguageAlert());
|
|
||||||
languageButton.setOnLongClickListener(v->{
|
|
||||||
if(!getLocalPrefs().bottomEncoding){
|
|
||||||
getLocalPrefs().bottomEncoding=true;
|
|
||||||
getLocalPrefs().save();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (!GlobalUserPreferences.relocatePublishButton)
|
if (!GlobalUserPreferences.relocatePublishButton)
|
||||||
publishButton.post(()->publishButton.setMinimumWidth(publishButton.getWidth()));
|
publishButton.post(()->publishButton.setMinimumWidth(publishButton.getWidth()));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue