fixed search engine issue

This commit is contained in:
gdlbo
2023-06-16 22:45:02 +03:00
parent 486026b8aa
commit 962dcdec67
2 changed files with 3 additions and 3 deletions
@@ -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) {