ios: use transparent background for images without text and quote (#1224)

This commit is contained in:
Evgeny Poberezkin
2022-10-18 10:07:45 +01:00
committed by GitHub
parent 39818b6fbb
commit 104e1040bf
@@ -207,8 +207,17 @@ private struct MetaColorPreferenceKey: PreferenceKey {
}
}
func onlyImage(_ ci: ChatItem) -> Bool {
if case let .image(text, _) = ci.content.msgContent {
return ci.quotedItem == nil && text == ""
}
return false
}
func chatItemFrameColor(_ ci: ChatItem, _ colorScheme: ColorScheme) -> Color {
ci.chatDir.sent
onlyImage(ci)
? Color.clear
: ci.chatDir.sent
? (colorScheme == .light ? sentColorLight : sentColorDark)
: Color(uiColor: .tertiarySystemGroupedBackground)
}