fix msg settings

This commit is contained in:
cheykrym 2025-12-12 00:50:13 +03:00
parent 4cd50b4482
commit b25fa16548
2 changed files with 8 additions and 12 deletions

View File

@ -11,6 +11,7 @@ struct PrivateChatView: View {
let lineLimitInChat = 6
@AppStorage("chatBubbleDecorationsEnabled") private var areBubbleDecorationsEnabled: Bool = true
@StateObject private var viewModel: PrivateChatViewModel
@State private var hasPositionedToBottom: Bool = false
@State private var scrollToBottomTrigger: UUID = .init()
@ -285,6 +286,7 @@ struct PrivateChatView: View {
.padding(.horizontal, 12)
.background(
MessageBubbleShape(
decorationsEnabled: areBubbleDecorationsEnabled,
showHornsRaw: decorations.showHorns,
showLegsRaw: decorations.showLegs
)
@ -832,17 +834,12 @@ private struct MessageBubbleShape: Shape {
var legWidth: CGFloat = 18
var legSpacing: CGFloat = 14
var decorationsEnabled: Bool = true
var showHornsRaw: Bool = true
var showLegsRaw: Bool = true
// Фактические флаги отрисовки
var showHorns: Bool {
AppConfig.ENABLE_CHAT_BUBBLE_DECORATIONS && showHornsRaw
}
var showLegs: Bool {
AppConfig.ENABLE_CHAT_BUBBLE_DECORATIONS && showLegsRaw
}
var showHorns: Bool { decorationsEnabled && showHornsRaw }
var showLegs: Bool { decorationsEnabled && showLegsRaw }
func path(in rect: CGRect) -> Path {
var path = Path()

View File

@ -12,11 +12,10 @@ struct AppConfig {
static let APP_BUILD = "appstore" // appstore / freestore
static let APP_VERSION = "0.1"
static let DISABLE_DB = false
/// Temporary flag to toggle whimsical chat bubble horns/legs rendering.
static let ENABLE_CHAT_BUBBLE_DECORATIONS = true
/// Controls whether incoming chat opens as a modal sheet (`true`) or navigates to Chats tab (`false`).
static let PRESENT_CHAT_AS_SHEET = false
static let DISABLE_DB = false
/// Fallback SQLCipher key used until the user sets an application password.
static let DEFAULT_DATABASE_ENCRYPTION_KEY = "yobble_dev_change_me"
}