Please merge this @sk22, its a transparency filter for when the translation is loading
This commit is contained in:
parent
87c5b23196
commit
0bbf937531
|
@ -154,6 +154,7 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||
if (item.translation == null) {
|
||||
translateProgress.setVisibility(View.VISIBLE);
|
||||
translateButton.setClickable(false);
|
||||
translateButton.setAlpha(.50f);
|
||||
new TranslateStatus(item.status.id).setCallback(new Callback<>() {
|
||||
@Override
|
||||
public void onSuccess(TranslatedStatus translatedStatus) {
|
||||
|
@ -161,6 +162,7 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||
item.translated = true;
|
||||
translateProgress.setVisibility(View.GONE);
|
||||
translateButton.setClickable(true);
|
||||
translateButton.setAlpha(1f);
|
||||
rebind();
|
||||
}
|
||||
|
||||
|
@ -168,6 +170,7 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||
public void onError(ErrorResponse error) {
|
||||
translateProgress.setVisibility(View.GONE);
|
||||
translateButton.setClickable(true);
|
||||
translateButton.setAlpha(1f);
|
||||
error.showToast(itemView.getContext());
|
||||
}
|
||||
}).exec(item.parentFragment.getAccountID());
|
||||
|
|
Loading…
Reference in New Issue