How do i use flipper_format_read_uint32() to read .ir files

Hi!
I am currently working on modifying the way IR remotes read from .ir-files are displayed (see my former Forum post here).

Therefore I’d like to read an additional parameter “page” from the file entries.
Since this parameter is usually not present within .ir-files, this shouldn’t be mandatory.

I try to read the “page” parameter from the .ir-file with flipper_format_read_uint32().
If an entry does not have a page parameter, it is not shown in the list of buttons anymore.

Am i right, that flipper_format_read_uint32() (and all similar functions) remove the first remaining line from the file and parses it? Because then a failed check for the existence of a page-entry will remove a line necessary for further processing and therefore render the currently processed entry invalid.

My code can be found here. I am currently working on infrared_remote.c and infrared_signal.c.

Regards