View Single Post
Old 04-19-2011, 10:33 AM   #113
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kiwidude View Post
That all sounds great thanks. One more related question. Is there a robust way for me to know if the user has a custom versus a saved search selected at the time they find duplicates? As I have to call a different function to restore the value so I need to know which it is. My hack I use currently will break with your change.
If the index is 2 and the first char is a *, it is a custom search. Be sure to remove the star before you restore the text.

Are you going to restore the search even if it wasn't active? My feeling is that you don't need to. In fact, after some reflection I wonder if you need to restore the restriction at all. The user can easily do that manually if desired.
chaley is offline   Reply With Quote