mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix controller with Media3
This commit is contained in:
parent
1ad956e965
commit
bdbfd005fa
1 changed files with 1 additions and 13 deletions
|
@ -245,7 +245,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
||||||
binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE);
|
binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE);
|
||||||
binding.mediaDescription.setVisibility(View.GONE);
|
binding.mediaDescription.setVisibility(View.GONE);
|
||||||
if (mCurrentFragment != null) {
|
if (mCurrentFragment != null) {
|
||||||
mCurrentFragment.toggleController(false);
|
mCurrentFragment.toggleController(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toasty.error(MediaActivity.this, getString(R.string.toast_error_translate), Toast.LENGTH_LONG).show();
|
Toasty.error(MediaActivity.this, getString(R.string.toast_error_translate), Toast.LENGTH_LONG).show();
|
||||||
|
@ -427,16 +427,10 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
||||||
binding.mediaDescription.setText(linkify(MediaActivity.this, description), TextView.BufferType.SPANNABLE);
|
binding.mediaDescription.setText(linkify(MediaActivity.this, description), TextView.BufferType.SPANNABLE);
|
||||||
if (attachments.get(binding.mediaViewpager.getCurrentItem()).translation != null) {
|
if (attachments.get(binding.mediaViewpager.getCurrentItem()).translation != null) {
|
||||||
binding.mediaDescription.setVisibility(View.GONE);
|
binding.mediaDescription.setVisibility(View.GONE);
|
||||||
if (mCurrentFragment != null) {
|
|
||||||
mCurrentFragment.toggleController(false);
|
|
||||||
}
|
|
||||||
binding.mediaDescriptionTranslated.setText(attachments.get(binding.mediaViewpager.getCurrentItem()).translation);
|
binding.mediaDescriptionTranslated.setText(attachments.get(binding.mediaViewpager.getCurrentItem()).translation);
|
||||||
binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE);
|
binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
binding.mediaDescription.setVisibility(View.VISIBLE);
|
binding.mediaDescription.setVisibility(View.VISIBLE);
|
||||||
if (mCurrentFragment != null) {
|
|
||||||
mCurrentFragment.toggleController(true);
|
|
||||||
}
|
|
||||||
binding.mediaDescriptionTranslated.setVisibility(View.GONE);
|
binding.mediaDescriptionTranslated.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -448,18 +442,12 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
||||||
}
|
}
|
||||||
binding.mediaDescriptionTranslated.setVisibility(View.GONE);
|
binding.mediaDescriptionTranslated.setVisibility(View.GONE);
|
||||||
binding.mediaDescription.setVisibility(View.GONE);
|
binding.mediaDescription.setVisibility(View.GONE);
|
||||||
if (mCurrentFragment != null) {
|
|
||||||
mCurrentFragment.toggleController(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.originalMessage.setVisibility(View.INVISIBLE);
|
binding.originalMessage.setVisibility(View.INVISIBLE);
|
||||||
binding.translate.setVisibility(View.GONE);
|
binding.translate.setVisibility(View.GONE);
|
||||||
binding.mediaDescriptionTranslated.setVisibility(View.GONE);
|
binding.mediaDescriptionTranslated.setVisibility(View.GONE);
|
||||||
binding.mediaDescription.setVisibility(View.GONE);
|
binding.mediaDescription.setVisibility(View.GONE);
|
||||||
if (mCurrentFragment != null) {
|
|
||||||
mCurrentFragment.toggleController(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue