From c8604895c440df72f468d4e0ac4e6fdfd42cc054 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 7 Jan 2021 10:13:40 -0500 Subject: [PATCH] [frio] Add share dropdown to mobile post view - This should prevent accidental taps from resharing content unwittingly --- src/Object/Post.php | 5 +-- view/theme/frio/templates/wall_thread.tpl | 38 ++++++++++++++++------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/Object/Post.php b/src/Object/Post.php index 12d8067423..21b2e4ce14 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -351,10 +351,11 @@ class Post $buttons['like'] = [DI::l10n()->t("I like this \x28toggle\x29") , DI::l10n()->t("like")]; $buttons['dislike'] = [DI::l10n()->t("I don't like this \x28toggle\x29"), DI::l10n()->t("dislike")]; if ($shareable) { - $buttons['share'] = [DI::l10n()->t('Quote and share this'), DI::l10n()->t('Quote Share')]; + $buttons['share'] = [DI::l10n()->t('Quote share this'), DI::l10n()->t('Quote Share')]; } if ($announceable) { - $buttons['announce'] = [DI::l10n()->t('Share this'), DI::l10n()->t('Share')]; + $buttons['announce'] = [DI::l10n()->t('Reshare this'), DI::l10n()->t('Reshare')]; + $buttons['unannounce'] = [DI::l10n()->t('Cancel your Reshare'), DI::l10n()->t('Unshare')]; } } diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 8bd5faa300..99316fce3e 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -440,17 +440,33 @@ as the value of $top_child_total (this is done at the end of this file) {{/if}} - {{* Button for announcing the item *}} - {{if $item.vote.announce}} -
- -
- {{/if}} - - {{* Button for sharing the item *}} - {{if $item.vote.share}} -
- + {{if $item.vote.announce OR $item.vote.share}} + {{/if}}