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prW>AAxx;Dm{J!F==-HVcJ3sGNdrIU#Pi3C)x~ps@Pd|^n
zFK>*J=&sZ*Z!WdA!VpMQNW~m5m&x^D?B2kIg>-N(d-dvKuz}DKK+{z
zqHFEN(AfCSL45XOzr{PsQQFju)GSYs0%|@5kVfdH(&W62!EeO`n`#SN`KQOqm7s&t
ztl>DCDawi^S1lz)iAz8!;J9ExvPuFNls(=z>4dwvX_ATFjAf0XaT2`MSPN`nT~NbL
zL^mrNKgrI!I!O>D2r7yB-Tmi`I!M3Ipznfxk}|g>eir51D$G{(Mb*1~^zY3|axNHk
zA`tQ8d~i+p;Ad$)^659+nFDbOJb(>~L&|$4$xe;l2)m;!TpivdXZ3`%;t;~2yRI>i
zeGWFpJAN^@SR%(H@qLbxPxj-h`^)Mxqt>#@R5@lPb0uBddwQ}m-`CjJT;sd_DS0tc
zQniA{v$XR<;{|!iwnl^5mRoH$MLwSPnFaWj^!S>}RDA7tL9SP7K>@b&(OiWw`unTu
z^3mk+0(^OT>PP{;MTOu!MLTDzZKkiTta;k@U+Rd^S5P-tkfbgB(Y;?M1y6dMAcp*x
r-Ttqa{ZHNgH~t(ElJ9*N%K|{m-&-&w0N}~Lmv{fB)&JN0uQ>1@WI`}^
literal 0
HcmV?d00001
diff --git a/Adamant/Services/AdamantNotificationService.swift b/Adamant/Services/AdamantNotificationService.swift
index 5289f0c0d..116c976a3 100644
--- a/Adamant/Services/AdamantNotificationService.swift
+++ b/Adamant/Services/AdamantNotificationService.swift
@@ -104,7 +104,7 @@ class AdamantNotificationsService: NotificationsService {
let content = UNMutableNotificationContent()
content.title = title
content.body = body
- content.sound = UNNotificationSound.default()
+ content.sound = UNNotificationSound(named: "notification.mp3")
content.badge = type.badge
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 1, repeats: false)
From 9a97be0432bb4d7e41f88a6461d3f59125c95f74 Mon Sep 17 00:00:00 2001
From: Pavel Anokhov
Date: Wed, 14 Mar 2018 00:43:39 +0300
Subject: [PATCH 10/12] Shorten estimated fee label.
---
Adamant/Assets/ru.lproj/Localizable.strings | 2 +-
Adamant/Stories/Chats/ChatViewController.swift | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Adamant/Assets/ru.lproj/Localizable.strings b/Adamant/Assets/ru.lproj/Localizable.strings
index 591f58afa..cb7448de4 100644
--- a/Adamant/Assets/ru.lproj/Localizable.strings
+++ b/Adamant/Assets/ru.lproj/Localizable.strings
@@ -76,7 +76,7 @@
"Error" = "Ошибка";
/* Chat: input bar: Estimated fee */
-"Estimated fee: %@" = "Примерная комиссия: %@";
+"~%@" = "~%@";
/* Transaction details: fee row. */
"Fee" = "Комиссия";
diff --git a/Adamant/Stories/Chats/ChatViewController.swift b/Adamant/Stories/Chats/ChatViewController.swift
index 4a1b47817..9083e91a9 100644
--- a/Adamant/Stories/Chats/ChatViewController.swift
+++ b/Adamant/Stories/Chats/ChatViewController.swift
@@ -15,7 +15,7 @@ extension String.adamantLocalized {
struct chat {
static let sendButton = NSLocalizedString("Send", comment: "Chat: Send message button")
static let messageInputPlaceholder = NSLocalizedString("New message", comment: "Chat: message input placeholder")
- static let estimatedFeeFormat = NSLocalizedString("Estimated fee: %@", comment: "Chat: input bar: Estimated fee")
+ static let estimatedFeeFormat = NSLocalizedString("~%@", comment: "Chat: input bar: Estimated fee")
static let messageIsEmpty = NSLocalizedString("Message is empty", comment: "Chat: Notify user that message cannot be empty")
static let messageTooLong = NSLocalizedString("Message is too long", comment: "Chat: Message is too long")
From 9b7b523e0d0419521a3cc3c6ddbad42c4ac9f065 Mon Sep 17 00:00:00 2001
From: Pavel Anokhov
Date: Wed, 14 Mar 2018 00:49:41 +0300
Subject: [PATCH 11/12] First message not set as readed fixed.
---
.../Services/DataProviders/AdamantChatsProvider.swift | 10 ++++++++--
Adamant/SharedCells/ChatTableViewCell.xib | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Adamant/Services/DataProviders/AdamantChatsProvider.swift b/Adamant/Services/DataProviders/AdamantChatsProvider.swift
index 7a5849e5a..53b7acb72 100644
--- a/Adamant/Services/DataProviders/AdamantChatsProvider.swift
+++ b/Adamant/Services/DataProviders/AdamantChatsProvider.swift
@@ -627,8 +627,14 @@ extension AdamantChatsProvider {
// MARK: 4. Unread messagess
- if let unreadHeight = readedLastHeight {
- let msgs = Dictionary(grouping: newChatTransactions.filter({$0.height > unreadHeight}), by: ({ (t: ChatTransaction) -> Chatroom in t.chatroom!}))
+ if let readedLastHeight = readedLastHeight {
+ let msgs = Dictionary(grouping: newChatTransactions.filter({$0.height > readedLastHeight}), by: ({ (t: ChatTransaction) -> Chatroom in t.chatroom!}))
+ for (chatroom, trs) in msgs {
+ chatroom.hasUnreadMessages = true
+ trs.forEach({$0.isUnread = true})
+ }
+ } else {
+ let msgs = Dictionary(grouping: newChatTransactions, by: ({ (t: ChatTransaction) -> Chatroom in t.chatroom!}))
for (chatroom, trs) in msgs {
chatroom.hasUnreadMessages = true
trs.forEach({$0.isUnread = true})
diff --git a/Adamant/SharedCells/ChatTableViewCell.xib b/Adamant/SharedCells/ChatTableViewCell.xib
index f97185f7a..ca267f699 100644
--- a/Adamant/SharedCells/ChatTableViewCell.xib
+++ b/Adamant/SharedCells/ChatTableViewCell.xib
@@ -55,7 +55,7 @@