Update copy and icon for release channel boost button.

This commit is contained in:
Cody Henthorne
2022-06-30 12:42:26 -04:00
parent 7b805e4041
commit 12a7f36bec
4 changed files with 9 additions and 25 deletions

View File

@@ -2031,16 +2031,12 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
@Override
public void onDonateClicked() {
if (SignalStore.donationsValues().isLikelyASustainer()) {
NavHostFragment navHostFragment = NavHostFragment.create(R.navigation.boosts);
NavHostFragment navHostFragment = NavHostFragment.create(R.navigation.boosts);
requireActivity().getSupportFragmentManager()
.beginTransaction()
.add(navHostFragment, "boost_nav")
.commitNow();
} else {
startActivity(AppSettingsActivity.subscriptions(requireContext()));
}
requireActivity().getSupportFragmentManager()
.beginTransaction()
.add(navHostFragment, "boost_nav")
.commitNow();
}
@Override

View File

@@ -538,13 +538,7 @@ public final class ConversationUpdateItem extends FrameLayout
}
});
if (SignalStore.donationsValues().isLikelyASustainer()) {
actionButton.setText(R.string.ConversationUpdateItem_signal_boost);
actionButton.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_boost_outline_16, 0, 0, 0);
} else {
actionButton.setText(R.string.ConversationUpdateItem_become_a_sustainer);
actionButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
}
actionButton.setText(R.string.ConversationUpdateItem_donate);
} else {
actionButton.setVisibility(GONE);
actionButton.setOnClickListener(null);

View File

@@ -211,9 +211,7 @@ public abstract class MessageRecord extends DisplayRecord {
} else if (isChangeNumber()) {
return fromRecipient(getIndividualRecipient(), r -> context.getString(R.string.MessageRecord_s_changed_their_phone_number, r.getDisplayName(context)), R.drawable.ic_phone_16);
} else if (isBoostRequest()) {
int message = SignalStore.donationsValues().isLikelyASustainer() ? R.string.MessageRecord_like_this_new_feature_say_thanks_with_a_boost
: R.string.MessageRecord_signal_is_powered_by_people_like_you_become_a_sustainer_today;
return staticUpdateDescription(context.getString(message), 0);
return staticUpdateDescription(context.getString(R.string.MessageRecord_like_this_new_feature_help_support_signal_with_a_one_time_donation), 0);
} else if (isEndSession()) {
if (isOutgoing()) return staticUpdateDescription(context.getString(R.string.SmsMessageRecord_secure_session_reset), R.drawable.ic_update_info_16);
else return fromRecipient(getIndividualRecipient(), r-> context.getString(R.string.SmsMessageRecord_secure_session_reset_s, r.getDisplayName(context)), R.drawable.ic_update_info_16);

View File

@@ -1298,9 +1298,7 @@
<string name="MessageRecord_a_message_from_s_couldnt_be_delivered">A message from %s couldn\'t be delivered</string>
<string name="MessageRecord_s_changed_their_phone_number">%1$s changed their phone number.</string>
<!-- Update item message shown in the release channel when someone is already a sustainer so we ask them if they want to boost. -->
<string name="MessageRecord_like_this_new_feature_say_thanks_with_a_boost">Like this new feature? Say thanks with a Boost.</string>
<!-- Update item message shown in the release channel when someone is not a sustainer so we ask them to consider becoming one -->
<string name="MessageRecord_signal_is_powered_by_people_like_you_become_a_sustainer_today">Signal is powered by people like you. Become a sustainer today.</string>
<string name="MessageRecord_like_this_new_feature_help_support_signal_with_a_one_time_donation">Like this new feature? Help support Signal with a one-time donation.</string>
<!-- Group Calling update messages -->
<string name="MessageRecord_s_started_a_group_call_s">%1$s started a group call · %2$s</string>
@@ -2113,9 +2111,7 @@
<string name="ConversationUpdateItem_view">View</string>
<string name="ConversationUpdateItem_the_disappearing_message_time_will_be_set_to_s_when_you_message_them">The disappearing message time will be set to %1$s when you message them.</string>
<!-- Update item button text to show to boost a feature -->
<string name="ConversationUpdateItem_signal_boost">Signal Boost</string>
<!-- Update item button text to show to become a sustainer in the release notes channel -->
<string name="ConversationUpdateItem_become_a_sustainer">Become a Sustainer</string>
<string name="ConversationUpdateItem_donate">Donate</string>
<!-- audio_view -->
<string name="audio_view__play_pause_accessibility_description">Play … Pause</string>