How are you managing the collections? If you do it from calibre, plug the device in and let calibre do its stuff.
If you are doing it manually on the device, then you need to redo them.
And yes, the sign out is what wiped them. Kobo do not sync any details of sideloaded books. Hence it cannot rebuild the collections afterwards. You have to do that separately.
|