Skip to content

Commit 26f0853

Browse files
committed
Fix deleted comments avatar bug
1 parent 3cbad9d commit 26f0853

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ForPDA/Sources/Models/Comments/Comment.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Comment: AbstractComment, ReflectedStringConvertible, Hashable {
1212
// MARK: - Properties
1313

1414
let id = UUID().uuidString
15-
let avatarUrl: URL
15+
let avatarUrl: URL?
1616
let author: String
1717
let text: String
1818
let date: String
@@ -25,7 +25,7 @@ class Comment: AbstractComment, ReflectedStringConvertible, Hashable {
2525
// MARK: - Init
2626

2727
init(
28-
avatarUrl: URL,
28+
avatarUrl: URL?,
2929
author: String,
3030
text: String,
3131
date: String,

ForPDA/Sources/Services/Parsing/ParsingService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ final class ParsingService {
440440
let commentType = try! element.select("div[id]").attr("class")
441441
guard commentType != "deleted" else {
442442
return Comment(
443-
avatarUrl: URL.defaultAvatar,
443+
avatarUrl: nil,
444444
author: "",
445445
text: "(Комментарий удален)",
446446
date: "",

0 commit comments

Comments
 (0)