Gmail folders error (mixed up)

Only for Gmail Accounts it happens that the folders list do not correctly link to the the named IMAP folders. So, e.g., when I select SENT in the list, I get the SPAM mails shown. I usually then find the sent mail folder under another header.

I experience this erronous behaviour for some time already (at least for half a year or more). However, I am not sure how I can further debug this error. After restart it then works correctly.

A major problem arised as a lot of my mails suddently showed up in the deleted folder which then might have had serious impact. I somehow now lost the trust that k9 can handle Gmail accounts flawlessly. It never happens with other mail accounts.

As I value k9 highly I would like to get this bug getting fixed.

Is it known? How to fix it?

This sounds like the kind of problem that could be caused by a corrupted app.

Flash storage in smartphones often encounters very rough conditions. It’s not as rare as one might think for data corruption to occur.
Try uninstalling the app, then reinstalling it. If that doesn’t resolve the problem, please record a video demonstrating the observed behavior.

Ok, thanks, I will try this and let you know in case it does not resolve it.

I would like to inform you that the error did not occur thereafter. I deleted the cache and all saved data of the app as suggested which solved the issue. Thanks for the quick support.