fix msg settings
This commit is contained in:
parent
4cd50b4482
commit
b25fa16548
@ -11,6 +11,7 @@ struct PrivateChatView: View {
|
|||||||
|
|
||||||
let lineLimitInChat = 6
|
let lineLimitInChat = 6
|
||||||
|
|
||||||
|
@AppStorage("chatBubbleDecorationsEnabled") private var areBubbleDecorationsEnabled: Bool = true
|
||||||
@StateObject private var viewModel: PrivateChatViewModel
|
@StateObject private var viewModel: PrivateChatViewModel
|
||||||
@State private var hasPositionedToBottom: Bool = false
|
@State private var hasPositionedToBottom: Bool = false
|
||||||
@State private var scrollToBottomTrigger: UUID = .init()
|
@State private var scrollToBottomTrigger: UUID = .init()
|
||||||
@ -285,6 +286,7 @@ struct PrivateChatView: View {
|
|||||||
.padding(.horizontal, 12)
|
.padding(.horizontal, 12)
|
||||||
.background(
|
.background(
|
||||||
MessageBubbleShape(
|
MessageBubbleShape(
|
||||||
|
decorationsEnabled: areBubbleDecorationsEnabled,
|
||||||
showHornsRaw: decorations.showHorns,
|
showHornsRaw: decorations.showHorns,
|
||||||
showLegsRaw: decorations.showLegs
|
showLegsRaw: decorations.showLegs
|
||||||
)
|
)
|
||||||
@ -832,17 +834,12 @@ private struct MessageBubbleShape: Shape {
|
|||||||
var legWidth: CGFloat = 18
|
var legWidth: CGFloat = 18
|
||||||
var legSpacing: CGFloat = 14
|
var legSpacing: CGFloat = 14
|
||||||
|
|
||||||
|
var decorationsEnabled: Bool = true
|
||||||
var showHornsRaw: Bool = true
|
var showHornsRaw: Bool = true
|
||||||
var showLegsRaw: Bool = true
|
var showLegsRaw: Bool = true
|
||||||
|
|
||||||
// Фактические флаги отрисовки
|
var showHorns: Bool { decorationsEnabled && showHornsRaw }
|
||||||
var showHorns: Bool {
|
var showLegs: Bool { decorationsEnabled && showLegsRaw }
|
||||||
AppConfig.ENABLE_CHAT_BUBBLE_DECORATIONS && showHornsRaw
|
|
||||||
}
|
|
||||||
|
|
||||||
var showLegs: Bool {
|
|
||||||
AppConfig.ENABLE_CHAT_BUBBLE_DECORATIONS && showLegsRaw
|
|
||||||
}
|
|
||||||
|
|
||||||
func path(in rect: CGRect) -> Path {
|
func path(in rect: CGRect) -> Path {
|
||||||
var path = Path()
|
var path = Path()
|
||||||
|
|||||||
@ -12,11 +12,10 @@ struct AppConfig {
|
|||||||
static let APP_BUILD = "appstore" // appstore / freestore
|
static let APP_BUILD = "appstore" // appstore / freestore
|
||||||
static let APP_VERSION = "0.1"
|
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`).
|
/// 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 PRESENT_CHAT_AS_SHEET = false
|
||||||
|
|
||||||
|
static let DISABLE_DB = false
|
||||||
/// Fallback SQLCipher key used until the user sets an application password.
|
/// Fallback SQLCipher key used until the user sets an application password.
|
||||||
static let DEFAULT_DATABASE_ENCRYPTION_KEY = "yobble_dev_change_me"
|
static let DEFAULT_DATABASE_ENCRYPTION_KEY = "yobble_dev_change_me"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user