Skip to content

Commit

Permalink
fix: commit code i forgot to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomatree committed Aug 22, 2024
1 parent 6dd1067 commit 6bd1266
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Revolt/Components/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func parseEmojisOnly(text: String) -> [String]? {
//
// @State var showMemberSheet: Bool = false
//
// func parseText(content: String, currentServer: String? = nil) -> [ContentPart] {
// func parseText(content: String, currentSelection: String? = nil) -> [ContentPart] {
// var parts: [ContentPart] = []
// let content = try! AttributedString(markdown: content, options: .init(allowsExtendedAttributes: true,
//interpretedSyntax: .full, failurePolicy: .returnPartiallyParsedIfPossible))
Expand All @@ -211,7 +211,7 @@ func parseEmojisOnly(text: String) -> [String]? {
// if let user = viewState.users[id] {
// let member: Member?
//
// if let server = currentServer {
// if let server = currentSelection {
// member = viewState.members[server]?[id]
// } else {
// member = nil
Expand Down Expand Up @@ -263,7 +263,7 @@ func parseEmojisOnly(text: String) -> [String]? {
//// ChannelIcon(channel: channel, spacing: 0, initialSize: (14, 14), frameSize: (16, 16))
//// .bold()
//// .onTapGesture {
//// viewState.currentServer = channel.server != nil ? .server(channel.server!) : .dms
//// viewState.currentSelection = channel.server != nil ? .server(channel.server!) : .dms
//// viewState.currentChannel = .channel(channel.id)
//// }
//// case .custom_emoji(let emojiId):
Expand Down Expand Up @@ -323,7 +323,7 @@ func parseEmojisOnly(text: String) -> [String]? {
// view = ChannelIcon(channel: channel, spacing: 0, initialSize: (14, 14), frameSize: (16, 16))
// .bold()
// .onTapGesture {
// viewState.currentServer = channel.server != nil ? .server(channel.server!) : .dms
// viewState.currentSelection = channel.server != nil ? .server(channel.server!) : .dms
// viewState.currentChannel = .channel(channel.id)
// }
//
Expand Down Expand Up @@ -464,7 +464,7 @@ struct Contents: View {
switch part {
case .user_mention(let string):
if let user = viewState.users[string] {
let member = viewState.currentServer.id.flatMap { viewState.members[$0] }.flatMap { $0[string] }
let member = viewState.currentSelection.id.flatMap { viewState.members[$0] }.flatMap { $0[string] }

let name = member?.nickname ?? user.display_name ?? user.username

Expand Down

0 comments on commit 6bd1266

Please sign in to comment.