Added the necessary code so that the application maintains its state (which Friend and/or Feed is selected) after a reconfiguration.