Skip to content

Commit

Permalink
fix: Remove accent from sortedName
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrdctr committed Jul 12, 2024
1 parent 2304c93 commit 0c56a01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kDriveCore/Data/Models/File.swift
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,10 @@ public final class File: Object, Codable {
uid = File.uid(driveId: driveId, fileId: id)
let decodedName = try container.decode(String.self, forKey: .name)
name = decodedName
sortedName = try container.decodeIfPresent(String.self, forKey: .sortedName)?.lowercased() ?? decodedName.lowercased()
sortedName = try (container.decodeIfPresent(String.self, forKey: .sortedName) ?? decodedName).lowercased().folding(
options: .diacriticInsensitive,
locale: .current
)
path = try container.decodeIfPresent(String.self, forKey: .path)
rawType = try container.decode(String.self, forKey: .rawType)
rawStatus = try container.decodeIfPresent(String.self, forKey: .rawStatus)
Expand Down

0 comments on commit 0c56a01

Please sign in to comment.