Skip to content

Commit

Permalink
chore: bump ios-core
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-coye committed May 25, 2023
1 parent d9361ac commit 8c4ca96
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
34 changes: 0 additions & 34 deletions Mail/Views/Thread/MessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,6 @@ import RealmSwift
import Shimmer
import SwiftUI

// TODO: move to Core
extension Sequence {
func asyncMap<T>(
_ transform: (Element) async throws -> T
) async rethrows -> [T] {
var values = [T]()

for element in self {
try await values.append(transform(element))
}

return values
}
}

// TODO: move to core
extension Sequence {
func asyncForEach(
_ operation: (Element) async throws -> Void
) async rethrows {
for element in self {
try await operation(element)
}
}
}

// TODO: move to core
extension Collection {
/// Returns the element at the specified index if it is within bounds, otherwise nil.
subscript(safe index: Index) -> Element? {
return indices.contains(index) ? self[index] : nil
}
}

struct MessageView: View {
@ObservedRealmObject var message: Message
@State var presentableBody: PresentableBody
Expand Down
2 changes: 1 addition & 1 deletion Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let project = Project(name: "Mail",
packages: [
.package(url: "https://github.com/Infomaniak/ios-login", .upToNextMajor(from: "4.0.0")),
.package(url: "https://github.com/Infomaniak/ios-dependency-injection", .upToNextMajor(from: "1.1.6")),
.package(url: "https://github.com/Infomaniak/ios-core", .revision("4c0c389de2e10e615ad79a854d2489977017efe5")),
.package(url: "https://github.com/Infomaniak/ios-core", .revision("9fc1a0f41ce0e830189b756d3b1a42d4e67421cc")),
.package(url: "https://github.com/Infomaniak/ios-core-ui", .upToNextMajor(from: "2.3.0")),
.package(url: "https://github.com/Infomaniak/ios-notifications", .upToNextMajor(from: "2.1.0")),
.package(url: "https://github.com/Infomaniak/ios-create-account", .upToNextMajor(from: "1.1.0")),
Expand Down

0 comments on commit 8c4ca96

Please sign in to comment.