tweet context menu fix

Signed-off-by: nuclearfog <hatespirit666@gmail.com>
This commit is contained in:
nuclearfog 2021-06-24 21:15:11 +02:00
parent d875a65f56
commit bd9bb66cf8
No known key found for this signature in database
GPG Key ID: AA0271FBE406DB98
1 changed files with 3 additions and 3 deletions

View File

@ -249,9 +249,9 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
if (tweet != null) {
Tweet currentTweet = tweet;
if (tweet.getEmbeddedTweet() != null)
currentTweet = tweet;
if (currentTweet.currentUserIsOwner())
m.findItem(R.id.delete_tweet).setVisible(true);
currentTweet = tweet.getEmbeddedTweet();
// enable delete option only if current user owns tweets
m.findItem(R.id.delete_tweet).setVisible(currentTweet.currentUserIsOwner());
}
return super.onPrepareOptionsMenu(m);
}