Skip to content

Commit 5c80ff8

Browse files
authored
Merge pull request #816 from Adamant-im/trello.com/c/TtOBs0dQ
[trello.com/c/TtOBs0dQ] Markdown doesn't support headers in Chat list
2 parents 1da97cd + fc07a71 commit 5c80ff8

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

Adamant.xcodeproj/project.pbxproj

+12-14
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
557AC306287B10D8004699D7 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 557AC305287B10D8004699D7 /* SnapKit */; };
1919
55D1D84F287B78F200F94A4E /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 55D1D84E287B78F200F94A4E /* SnapKit */; };
2020
55D1D851287B78FC00F94A4E /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 55D1D850287B78FC00F94A4E /* SnapKit */; };
21-
6403F5DB2272389800D58779 /* (null) in Sources */ = {isa = PBXBuildFile; };
21+
6403F5DB2272389800D58779 /* BuildFile in Sources */ = {isa = PBXBuildFile; };
2222
6FB686162D3AAE8800CAB6DD /* AdamantWalletsKit in Frameworks */ = {isa = PBXBuildFile; productRef = 6FB686152D3AAE8800CAB6DD /* AdamantWalletsKit */; };
2323
9342F6C22A6A35E300A9B39F /* CommonKit in Frameworks */ = {isa = PBXBuildFile; productRef = 9342F6C12A6A35E300A9B39F /* CommonKit */; };
2424
937751A52A68B3320054BD65 /* CommonKit in Frameworks */ = {isa = PBXBuildFile; productRef = 937751A42A68B3320054BD65 /* CommonKit */; };
@@ -31,7 +31,7 @@
3131
A5241B70262DEDE1009FA43E /* Clibsodium in Frameworks */ = {isa = PBXBuildFile; productRef = A5241B6F262DEDE1009FA43E /* Clibsodium */; };
3232
A5241B77262DEDEF009FA43E /* Clibsodium in Frameworks */ = {isa = PBXBuildFile; productRef = A5241B76262DEDEF009FA43E /* Clibsodium */; };
3333
A5241B7E262DEDFE009FA43E /* Clibsodium in Frameworks */ = {isa = PBXBuildFile; productRef = A5241B7D262DEDFE009FA43E /* Clibsodium */; };
34-
A530B0D82842110D003F0210 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
34+
A530B0D82842110D003F0210 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
3535
A544F0D4262C9878001F1A6D /* Eureka in Frameworks */ = {isa = PBXBuildFile; productRef = A544F0D3262C9878001F1A6D /* Eureka */; };
3636
A57282CA262C94CD00C96FA8 /* DateToolsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A57282C9262C94CD00C96FA8 /* DateToolsSwift */; };
3737
A57282D1262C94DA00C96FA8 /* DateToolsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A57282D0262C94DA00C96FA8 /* DateToolsSwift */; };
@@ -249,6 +249,8 @@
249249
};
250250
D3A860F82DA1C1980007B599 /* NotificationsShared */ = {
251251
isa = PBXFileSystemSynchronizedRootGroup;
252+
exceptions = (
253+
);
252254
path = NotificationsShared;
253255
sourceTree = "<group>";
254256
};
@@ -315,7 +317,7 @@
315317
A5DBBABD262C7221004AC028 /* Clibsodium in Frameworks */,
316318
6FB686162D3AAE8800CAB6DD /* AdamantWalletsKit in Frameworks */,
317319
938F7D582955C1DA001915CA /* MessageKit in Frameworks */,
318-
A530B0D82842110D003F0210 /* (null) in Frameworks */,
320+
A530B0D82842110D003F0210 /* BuildFile in Frameworks */,
319321
4177E5E12A52DA7100C089FE /* AdvancedContextMenuKit in Frameworks */,
320322
A5D87BA3262CA01D00DC28F0 /* ProcedureKit in Frameworks */,
321323
A5C99E0E262C9E3A00F7B1B7 /* Reachability in Frameworks */,
@@ -667,12 +669,12 @@
667669
A57282C8262C94CD00C96FA8 /* XCRemoteSwiftPackageReference "DateTools" */,
668670
A544F0D2262C9878001F1A6D /* XCRemoteSwiftPackageReference "Eureka" */,
669671
A5F0A049262C9CA90009672A /* XCRemoteSwiftPackageReference "Swinject" */,
670-
A5C99E0C262C9E3A00F7B1B7 /* XCRemoteSwiftPackageReference "Reachability" */,
672+
A5C99E0C262C9E3A00F7B1B7 /* XCRemoteSwiftPackageReference "Reachability.swift" */,
671673
A5D87BA1262CA01D00DC28F0 /* XCRemoteSwiftPackageReference "ProcedureKit" */,
672674
A5AC8DFD262E0B030053A7E2 /* XCRemoteSwiftPackageReference "SipHash" */,
673675
3A8875ED27BBF38D00436195 /* XCRemoteSwiftPackageReference "Parchment" */,
674676
557AC304287B10D8004699D7 /* XCRemoteSwiftPackageReference "SnapKit" */,
675-
416F5EA2290162EB00EF0400 /* XCRemoteSwiftPackageReference "socket" */,
677+
416F5EA2290162EB00EF0400 /* XCRemoteSwiftPackageReference "socket.io-client-swift" */,
676678
938F7D562955C1DA001915CA /* XCRemoteSwiftPackageReference "MessageKit" */,
677679
4184F16F2A33044E00D7B8B9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
678680
3AC76E3B2AB09118008042C4 /* XCRemoteSwiftPackageReference "Elegant-Emoji-Picker" */,
@@ -762,14 +764,10 @@
762764
inputFileListPaths = (
763765
"${PODS_ROOT}/Target Support Files/Pods-Adamant/Pods-Adamant-frameworks-${CONFIGURATION}-input-files.xcfilelist",
764766
);
765-
inputPaths = (
766-
);
767767
name = "[CP] Embed Pods Frameworks";
768768
outputFileListPaths = (
769769
"${PODS_ROOT}/Target Support Files/Pods-Adamant/Pods-Adamant-frameworks-${CONFIGURATION}-output-files.xcfilelist",
770770
);
771-
outputPaths = (
772-
);
773771
runOnlyForDeploymentPostprocessing = 0;
774772
shellPath = /bin/sh;
775773
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Adamant/Pods-Adamant-frameworks.sh\"\n";
@@ -826,7 +824,7 @@
826824
isa = PBXSourcesBuildPhase;
827825
buildActionMask = 2147483647;
828826
files = (
829-
6403F5DB2272389800D58779 /* (null) in Sources */,
827+
6403F5DB2272389800D58779 /* BuildFile in Sources */,
830828
);
831829
runOnlyForDeploymentPostprocessing = 0;
832830
};
@@ -1369,7 +1367,7 @@
13691367
kind = branch;
13701368
};
13711369
};
1372-
416F5EA2290162EB00EF0400 /* XCRemoteSwiftPackageReference "socket" */ = {
1370+
416F5EA2290162EB00EF0400 /* XCRemoteSwiftPackageReference "socket.io-client-swift" */ = {
13731371
isa = XCRemoteSwiftPackageReference;
13741372
repositoryURL = "https://github.com/socketio/socket.io-client-swift";
13751373
requirement = {
@@ -1449,7 +1447,7 @@
14491447
minimumVersion = 1.2.2;
14501448
};
14511449
};
1452-
A5C99E0C262C9E3A00F7B1B7 /* XCRemoteSwiftPackageReference "Reachability" */ = {
1450+
A5C99E0C262C9E3A00F7B1B7 /* XCRemoteSwiftPackageReference "Reachability.swift" */ = {
14531451
isa = XCRemoteSwiftPackageReference;
14541452
repositoryURL = "https://github.com/ashleymills/Reachability.swift";
14551453
requirement = {
@@ -1528,7 +1526,7 @@
15281526
};
15291527
416F5EA3290162EB00EF0400 /* SocketIO */ = {
15301528
isa = XCSwiftPackageProductDependency;
1531-
package = 416F5EA2290162EB00EF0400 /* XCRemoteSwiftPackageReference "socket" */;
1529+
package = 416F5EA2290162EB00EF0400 /* XCRemoteSwiftPackageReference "socket.io-client-swift" */;
15321530
productName = SocketIO;
15331531
};
15341532
4177E5E02A52DA7100C089FE /* AdvancedContextMenuKit */ = {
@@ -1646,7 +1644,7 @@
16461644
};
16471645
A5C99E0D262C9E3A00F7B1B7 /* Reachability */ = {
16481646
isa = XCSwiftPackageProductDependency;
1649-
package = A5C99E0C262C9E3A00F7B1B7 /* XCRemoteSwiftPackageReference "Reachability" */;
1647+
package = A5C99E0C262C9E3A00F7B1B7 /* XCRemoteSwiftPackageReference "Reachability.swift" */;
16501648
productName = Reachability;
16511649
};
16521650
A5D87BA2262CA01D00DC28F0 /* ProcedureKit */ = {

Adamant/Modules/Chat/ViewModel/ChatMessageFactory.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ extension ChatMessageFactory {
220220
let replyMessage = makeAttributed(replyMessageRaw)
221221
let decodedMessage = transaction.getRichValue(for: RichContentKeys.reply.decodedReplyMessage) ?? "..."
222222
let decodedMessageMarkDown = FilePresentationHelper.getFilePresentationText(from: decodedMessage, parsedWith: Self.markdownReplyParser, resolveLinkColor: true)
223+
let decodedAttributedMessage = MessageProcessHelper.process(attributedText: decodedMessageMarkDown)
223224
let reactions = transaction.richContent?[RichContentKeys.react.reactions] as? Set<Reaction>
224225

225226
let address =
@@ -238,7 +239,7 @@ extension ChatMessageFactory {
238239
id: transaction.txId,
239240
replyId: replyId,
240241
message: replyMessage,
241-
messageReply: decodedMessageMarkDown,
242+
messageReply: decodedAttributedMessage,
242243
backgroundColor: backgroundColor,
243244
isFromCurrentSender: isFromCurrentSender,
244245
reactions: reactions,

Adamant/Modules/ChatsList/ChatListViewController.swift

-2
Original file line numberDiff line numberDiff line change
@@ -1036,8 +1036,6 @@ extension ChatListViewController {
10361036
guard var text = message.message else {
10371037
return nil
10381038
}
1039-
text = MessageProcessHelper.process(text)
1040-
10411039
var attributedText = markdownParser.parse(text).resolveLinkColor()
10421040
attributedText = MessageProcessHelper.process(attributedText: attributedText)
10431041

Adamant/Services/RichTransactionReplyService/AdamantRichTransactionReplyService.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ extension AdamantRichTransactionReplyService {
241241
message = decodedMessage
242242
}
243243

244-
return MessageProcessHelper.process(message)
244+
return message
245245
}
246246

247247
fileprivate func getReplyMessage(from transaction: BaseTransaction) throws -> String {
@@ -303,7 +303,7 @@ extension AdamantRichTransactionReplyService {
303303
message = unknownErrorMessage
304304
}
305305

306-
return MessageProcessHelper.process(message)
306+
return message
307307
}
308308

309309
fileprivate func setReplyMessage(

0 commit comments

Comments
 (0)