Currently the View toggle is global. But I propose that view mode setting should be persistent for each directory again.
The problem is when a user wants to always view some directories by list (example: ~/Projects/src) and others by icons (example: ~/Pictures). When going from one directory to another, in such a context, the user must always click the toggle again to get the desired view back. Doing something again and again isn’t productive. There is a closed bug report on Gitlab.
Fix suggestion on Gitlab : To fix this, the chosen view is saved in a “.directory” file complying with the FreeDesktop specification. The new code is isolated as much as possible (at the end of the file) and is designed like an independent unit with an API. Only 2 functions make use of the API. This fix supports / as well as Recent, Starred, Trash, Etc. The compilation and execution generate no warnings.