forked from organicmaps/organicmaps
[android][ios] notification message is changed
This commit is contained in:
parent
c0e512911d
commit
5d76a71818
3 changed files with 17 additions and 8 deletions
|
@ -91,11 +91,17 @@ public final class Notifier
|
|||
PendingIntent.getActivity(mContext, 0, reviewIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
String channel = NotificationChannelFactory.createProvider(mContext).getUGCChannel();
|
||||
String content = source.getAddress().isEmpty()
|
||||
? source.getReadableName()
|
||||
: source.getReadableName() + ", " + source.getAddress();
|
||||
|
||||
NotificationCompat.Builder builder =
|
||||
getBuilder(mContext.getString(R.string.notification_leave_review_title,
|
||||
source.getReadableName()),
|
||||
mContext.getString(R.string.notification_leave_review_content),
|
||||
pi, channel)
|
||||
getBuilder(mContext.getString(R.string.notification_leave_review_v2_android_short_title),
|
||||
content, pi, channel)
|
||||
.setStyle(new NotificationCompat.BigTextStyle()
|
||||
.setBigContentTitle(
|
||||
mContext.getString(R.string.notification_leave_review_v2_title))
|
||||
.bigText(content))
|
||||
.addAction(0, mContext.getString(R.string.leave_a_review), pi);
|
||||
|
||||
getNotificationManager().notify(ID_LEAVE_REVIEW, builder.build());
|
||||
|
|
|
@ -460,8 +460,12 @@ using namespace osm_auth_ios;
|
|||
auto const notification = notificationCandidate.get();
|
||||
if (notification.GetType() == notifications::NotificationCandidate::Type::UgcReview)
|
||||
{
|
||||
auto const place = notification.GetAddress().empty()
|
||||
? notification.GetReadableName()
|
||||
: notification.GetReadableName() + ", " + notification.GetAddress();
|
||||
|
||||
[LocalNotificationManager.sharedManager
|
||||
showReviewNotificationForPlace:@(notification.GetReadableName().c_str())
|
||||
showReviewNotificationForPlace:@(place.c_str())
|
||||
onTap:^{
|
||||
[Statistics logEvent:kStatUGCReviewNotificationClicked];
|
||||
place_page::Info info;
|
||||
|
|
|
@ -140,9 +140,8 @@ using namespace storage;
|
|||
self.onReviewNotification = onReviewNotification;
|
||||
|
||||
UILocalNotification * notification = [[UILocalNotification alloc] init];
|
||||
notification.alertTitle = [NSString stringWithCoreFormat:L(@"notification_leave_review_title")
|
||||
arguments:@[place]];
|
||||
notification.alertBody = L(@"notification_leave_review_content");
|
||||
notification.alertTitle = L(@"notification_leave_review_v2_title");
|
||||
notification.alertBody = place;
|
||||
notification.alertAction = L(@"leave_a_review");
|
||||
notification.soundName = UILocalNotificationDefaultSoundName;
|
||||
notification.userInfo = @{kLocalNotificationNameKey : kReviewNotificationValue};
|
||||
|
|
Loading…
Add table
Reference in a new issue