From 029b625acd7ff6e6d1cdcd5f37cf02f87ab7f628 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Tue, 20 Dec 2022 14:35:47 +0100 Subject: [PATCH] Readme and better Markdown --- .../Models/Sources/Models/Alias/HTMLString.swift | 4 +++- Packages/Models/Sources/Models/Status.swift | 2 +- README.md | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Packages/Models/Sources/Models/Alias/HTMLString.swift b/Packages/Models/Sources/Models/Alias/HTMLString.swift index 8899dd49..8a26d32d 100644 --- a/Packages/Models/Sources/Models/Alias/HTMLString.swift +++ b/Packages/Models/Sources/Models/Alias/HTMLString.swift @@ -16,7 +16,9 @@ extension HTMLString { public var asSafeAttributedString: AttributedString { do { - return try AttributedString(markdown: asMarkdown) + let options = AttributedString.MarkdownParsingOptions(allowsExtendedAttributes: true, + interpretedSyntax: .inlineOnlyPreservingWhitespace) + return try AttributedString(markdown: asMarkdown, options: options) } catch { return AttributedString(stringLiteral: self) } diff --git a/Packages/Models/Sources/Models/Status.swift b/Packages/Models/Sources/Models/Status.swift index f4bf4334..b11c2a28 100644 --- a/Packages/Models/Sources/Models/Status.swift +++ b/Packages/Models/Sources/Models/Status.swift @@ -2,7 +2,7 @@ import Foundation public protocol AnyStatus { var id: String { get } - var content: String { get } + var content: HTMLString { get } var account: Account { get } var createdAt: String { get } var mediaAttachments: [MediaAttachement] { get } diff --git a/README.md b/README.md index a7d786c4..4575c9b3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,17 @@ # IceCubesApp -A SwiftUI Mastodon client + +IceCubesApp is an open source application for accessing the decentralized social network Mastodon! It's built entirely in SwiftUI, making it fast, lightweight, and easy to use. + +You can connect to any Mastodon instance and browse your timeline, interact with other users, and post updates and media. + +The project is split into different Swift Packages to make it easier to manage and maintain the codebase. Each package is focused on a specific aspect of the application, such as the UI, network communication, or data models. This modular approach allows for easier collaboration and ensures that the code is organized and easy to understand. + +It's a great starting point for learning SwiftUI. The app covers many of the basic concepts of SwiftUI, such as building layouts, working with data, and handling user interaction. By exploring the code, you can gain a solid understanding of how to use SwiftUI in your daily life. Plus, the open source nature of IceCubesApp means that you can see how real-world applications are built and get a sense of best practices for using SwiftUI. + +The architecture is straighforward MVVM for most parts, no redux on this one ;) + +Please note that IceCubesApp is currently in an early stage of development and as such, there are many features that are still missing. While the app is functional and can be used to browse and interact with Mastodon, there are still many features that are planned for the future. + +Thanks! ![Icon](IceCubesApp/Assets.xcassets/AppIcon.appiconset/icon.png?)