Optimize Firebase
This commit is contained in:
@@ -66,7 +66,7 @@ suspend fun WebView.evaluate(script: String): String = coroutineScope {
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
suspend fun WebView.evaluatePromise(
|
||||
script: String,
|
||||
then: String = ".then(result => Callback.onResult(%uid, JSON.stringify(result))).catch(err => { console.err(err); Callback.onError(%uid, JSON.stringify(err)); })"
|
||||
then: String = ".then(result => Callback.onResult(%uid, JSON.stringify(result))).catch(err => Callback.onError(%uid, JSON.stringify(err)))"
|
||||
): String = coroutineScope {
|
||||
var result: String? = null
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ suspend fun getSuggestionsForQuery(query: String) : List<Suggestion> {
|
||||
then = """
|
||||
.then(r => {
|
||||
let [results, results_serial] = r;
|
||||
console.log(results_serial, r, search_serial);
|
||||
if (search_serial !== results_serial) {
|
||||
Callback.onResult(%uid, '[]');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user