Save query history
Redo query on orientation change