Skip to content

1.0.0-beta.9

Latest
Compare
Choose a tag to compare
@x-0o0 x-0o0 released this 01 Aug 19:15
· 12 commits to main since this release
10d6461

What's Changed

  • Updated to allow configuration of Giphy UI by @fred-bowker in #31
  • [FIX] Adjusted code styles by @jaesung-0o0 in #32
  • Added NextMessageField to provide easy-customizable contents by @jaesung-0o0 in #33
  • Added scrolledToEndPublisher (Beta) by @jaesung-0o0 in #34

New Contributors

Full Changelog: 1.0.0-beta.8...1.0.0-beta.9

Example Usage - NextMessageField

 @State private var text: String = ""
 
 NextMessageField(text) { messageStyle in
    guard !text.isEmpty else { return }
    viewModel.sendMessage($0)
    text = ""
 } leftLabel: {
    HStack {
        Button(aciton: showCamera) {
            Image.camera.medium
        }
        .frame(width: 36, height: 36)
 
        Button(action: showLibrary) {
            Image.photoLibrary.medium
        }
        .frame(width: 36, height: 36)
 } rightLabel: {
    Button {
        // send message by using `sendMessagePublisher`. This will invoke `onSend` handler.
        sendMessagePublisher.send(.text(text))
    } label: {
        // send button icon
        Image.send.medium
    }
    .frame(width: 36, height: 36)
 }

Example Usage - GiphyConfiguration

let giphyConfig = GiphyConfiguration(
    dimBackground: true, 
    presentationDetents = 0.7
)
let chatConfig = ChatConfiguration(
    userID: "{USER.ID}", 
    giphyKey: "{YOUR.GIPHY.KEY}", 
    giphyConfig: giphyConfig
)

// ...

ChatView()
    .environmentObject(chatConfig)

Notice

  • scrolledToEndPublisher publisher is added, but because it's a beta feature, I'm not responsible for any issues that may arise during using it.
  • Added messageTimeFormat to Appearance. This allows to display 24 hour clock
  • Removed the padding of the MessageField to prevent making too much top spacing. To adjust a padding to the MessageField, please use .padding() modifier manually.