fixed search engine issue
This commit is contained in:
@@ -130,6 +130,8 @@ public class PhotoViewer {
|
||||
.setItems(items, (di, i) -> openUrl(SearchEngine.values()[i].buildSearchUrl(url)))
|
||||
.show();
|
||||
} else {
|
||||
// index correction for old versions with numeration "1-x"
|
||||
if (selectedEngine >= SearchEngine.values().length) SearchEngine.setDefaultSearchEngine(--selectedEngine);
|
||||
openUrl(SearchEngine.values()[selectedEngine].buildSearchUrl(url));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.vtosters.lite.R;
|
||||
import okhttp3.Headers;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import ru.vtosters.hooks.other.Preferences;
|
||||
import ru.vtosters.hooks.other.ThemesUtils;
|
||||
@@ -33,7 +32,6 @@ import ru.vtosters.lite.utils.AndroidUtils;
|
||||
import ru.vtosters.lite.utils.LifecycleUtils;
|
||||
import ru.vtosters.lite.utils.SearchEngine;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
@@ -261,7 +259,7 @@ public class MediaFragment extends TrackedMaterialPreferenceToolbarFragment {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});;
|
||||
});
|
||||
}
|
||||
|
||||
private void deleteVideoHistoryDialog(Context context) {
|
||||
|
||||
Reference in New Issue
Block a user