lainsce / quilter

[DEPRECATED] Focus on your writing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Outline does not update

bertob opened this issue · comments

When I start a new doucment and add some headers, they don't show up in the "outline" section (Which I assume they should?):

image

commented

Fixing this. :)

commented

Fixed.

Are you sure this is is fixed? I just built master and it's still happening:

image

commented

It takes a moment after you save the file somewhere.

Freshly new files made by the New Document button aren't files yet until you save them somewhere. 🤔

That's a bit counterintuitive, I assumed that the outline updates live as I add/remove titles.

commented

It does, but only with files that exist in the file system... I couldn't find a way to make it work with cache files :(

Maybe temporarily save them in the flatpak directory? Or does that not work either?

commented

That was the first thing I tried before just settling on new files are ephemeral on creation but after closing Quilter/saving they become real files.

Maybe I should hide outline until the file is saved, then show it?

commented

Also, lemme reopen this lol

Maybe I should hide outline until the file is saved, then show it?

That sounds like it'd be suprising, but maybe worth a try if there's no other option

commented

That sounds like it'd be suprising, but maybe worth a try if there's no other option

I've seen this happen on more complex apps where certain parts only show if needed.
Maybe it's even better than having dead UI lying around until some mysterious condition (for the user, at least) is met for it to start being alive.

commented

I just thought of a better way to make this work:

If the file is selected in the sidebar, show Outline for that file, otherwise, hide.

This might work for the cache files as well.

commented

Nevermind, I found out why it wasn't working; I wasn't calling the methods for the outline in the proper places on cache files' case. This is now actually fixed.