Ancestors

Written by Chris Wu :toucan: on 2025-01-13 at 21:15

I shared a (still great) tip last week about using ViewThatFits to show as much of a date as possible.

It will actually cause a crash if your language is set to German.

The problem is the weekday is the same for abbreviated and short, which causes some duplicates. That's a problem since they're used in a ForEach that is using self for an id.

[#]SwiftUI

=> View attached media

=> More informations about this toot | More toots from MuseumShuffle@mastodon.social

Toot

Written by Bruno Philipe on 2025-01-13 at 21:21

@MuseumShuffle could you place the strings in a set, then use that in a ForEach that emits Text views, rather than the Text views directly? This should unique them regardless of the locale.

=> More informations about this toot | More toots from brunoph@breakpoint.cafe

Descendants

Written by Chris Wu :toucan: on 2025-01-13 at 21:24

@brunoph I like that idea, but wouldn't the order be lost?

I was planning on putting each entry in a struct with a UUID id.

=> More informations about this toot | More toots from MuseumShuffle@mastodon.social

Written by Bruno Philipe on 2025-01-13 at 21:25

@MuseumShuffle then sort by length, which will give you an array

=> More informations about this toot | More toots from brunoph@breakpoint.cafe

Written by Chris Wu :toucan: on 2025-01-13 at 21:25

@brunoph Bruno have I ever told you that you're a genius?

=> More informations about this toot | More toots from MuseumShuffle@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113823141511504205
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
306.014257 milliseconds
Gemini-to-HTML Time
0.79431 milliseconds

This content has been proxied by September (3851b).