diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/ComposeActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ComposeActivity.java index 03d33238..d0e53c86 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/ComposeActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ComposeActivity.java @@ -669,7 +669,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana mention.username = mentionBooster.username; boolean present = false; for (Mention mentionTmp : statusDraftList.get(0).mentions) { - if (mentionTmp.acct.equalsIgnoreCase(mentionBooster.acct)) { + if (mentionTmp.acct.equalsIgnoreCase("@"+mentionBooster.acct)) { present = true; break; } diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java index 1c81ddcf..3793ed0d 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java @@ -186,7 +186,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload binding.mediaDescription.setMovementMethod(LinkMovementMethod.getInstance()); binding.mediaDescriptionTranslated.setMovementMethod(LinkMovementMethod.getInstance()); - if (description != null && description.trim().length() > 0 && description.trim().compareTo("null") != 0) { + if (description != null && !description.trim().isEmpty() && description.trim().compareTo("null") != 0) { binding.mediaDescription.setText(description); binding.translate.setOnClickListener(v -> { String descriptionToTranslate = attachments.get(mediaPosition - 1).description; @@ -234,7 +234,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload handler.removeCallbacksAndMessages(null); } handler = new Handler(); - if (description != null && description.trim().length() > 0 && description.trim().compareTo("null") != 0) { + if (description != null && !description.trim().isEmpty() && description.trim().compareTo("null") != 0) { binding.mediaDescription.setText(linkify(MediaActivity.this, description), TextView.BufferType.SPANNABLE); } binding.translate.setOnClickListener(v -> { @@ -495,6 +495,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload this.fullscreen = fullscreen; if (!fullscreen) { showSystemUI(); + binding.descriptionContainer.setVisibility(View.VISIBLE); binding.mediaDescription.setVisibility(View.VISIBLE); if (mCurrentFragment != null) { mCurrentFragment.toggleController(true); @@ -505,6 +506,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload } } else { hideSystemUI(); + binding.descriptionContainer.setVisibility(View.GONE); binding.mediaDescription.setVisibility(View.GONE); if (mCurrentFragment != null) { mCurrentFragment.toggleController(false); diff --git a/app/src/main/res/layouts/mastodon/layout/activity_media_pager.xml b/app/src/main/res/layouts/mastodon/layout/activity_media_pager.xml index b5e2dcb9..7f7e799f 100644 --- a/app/src/main/res/layouts/mastodon/layout/activity_media_pager.xml +++ b/app/src/main/res/layouts/mastodon/layout/activity_media_pager.xml @@ -22,6 +22,8 @@ android:animateLayoutChanges="true" android:background="@android:color/transparent"> + + - - - - - + tools:visibility="visible" + app:layout_constraintStart_toStartOf="parent" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + + + + + + \ No newline at end of file