SectionIndexTitles not working after refetch #182

Closed
opened 2025-12-29 18:24:07 +01:00 by adam · 1 comment
Owner

Originally created by @zalogatomek on GitHub (Oct 26, 2017).

So, let me use your CoreStoreDemo app.

I've added this simple function:

    override func sectionIndexTitles(for tableView: UITableView) -> [String]? {
        return ColorsDemo.palettes.sectionIndexTitles()
    }

to ListObserverDemoViewController.

At start, sectionIndexTitlesworks as expected (I can see them). But when I tap on filterBarButtonItem sectionIndexTitles dissapears.

I've tested it on version 4.2.1.

Originally created by @zalogatomek on GitHub (Oct 26, 2017). So, let me use your CoreStoreDemo app. I've added this simple function: ```swift override func sectionIndexTitles(for tableView: UITableView) -> [String]? { return ColorsDemo.palettes.sectionIndexTitles() } ``` to `ListObserverDemoViewController`. At start, `sectionIndexTitles`works as expected (I can see them). But when I tap on `filterBarButtonItem` `sectionIndexTitles` dissapears. I've tested it on version 4.2.1.
adam added the corestore bug label 2025-12-29 18:24:07 +01:00
adam closed this issue 2025-12-29 18:24:07 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Oct 27, 2017):

Thanks for the report!

I think this is because indexes are cached during FRC's fetch, which on ListMonitor.refetch() happens before the SectionBy is applied. I'll need to think how to handle this because the SectionBy closure may need to run on a background thread.

@JohnEstropia commented on GitHub (Oct 27, 2017): Thanks for the report! I think this is because indexes are cached during FRC's fetch, which on ListMonitor.refetch() happens before the SectionBy is applied. I'll need to think how to handle this because the SectionBy closure may need to run on a background thread.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore-JohnEstropia#182