Skip to content

Commit

Permalink
Check markdown capability
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Müller <[email protected]>
  • Loading branch information
SystemKeeper committed Nov 16, 2023
1 parent 2a474f2 commit 519b2d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions NextcloudTalk/InputbarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ import UIKit
self.textView.tintColor = UIColor(cgColor: UIColor.systemBlue.cgColor)

// Markdown formatting options
self.textView.registerMarkdownFormattingSymbol("**", withTitle: NSLocalizedString("Bold", comment: "Bold text"))
self.textView.registerMarkdownFormattingSymbol("_", withTitle: NSLocalizedString("Italic", comment: "Italic text"))
self.textView.registerMarkdownFormattingSymbol("~~", withTitle: NSLocalizedString("Strikethrough", comment: "Strikethrough text"))
self.textView.registerMarkdownFormattingSymbol("`", withTitle: NSLocalizedString("Code", comment: "Code block"))
if NCDatabaseManager.sharedInstance().serverHasTalkCapability(kCapabilityMarkdownMessages) {
self.textView.registerMarkdownFormattingSymbol("**", withTitle: NSLocalizedString("Bold", comment: "Bold text"))
self.textView.registerMarkdownFormattingSymbol("_", withTitle: NSLocalizedString("Italic", comment: "Italic text"))
self.textView.registerMarkdownFormattingSymbol("~~", withTitle: NSLocalizedString("Strikethrough", comment: "Strikethrough text"))
self.textView.registerMarkdownFormattingSymbol("`", withTitle: NSLocalizedString("Code", comment: "Code block"))
}

if let pendingMessage = self.room.pendingMessage {
self.setChatMessage(pendingMessage)
Expand Down

0 comments on commit 519b2d9

Please sign in to comment.