Removed logs

This commit is contained in:
tom5079
2022-01-08 18:33:48 +09:00
parent e498efc493
commit 0fd2cf4fd7
5 changed files with 6 additions and 5 deletions

View File

@@ -67,7 +67,7 @@ suspend fun WebView.evaluate(script: String): String = coroutineScope {
suspend fun WebView.evaluatePromise(
script: String,
then: String = ".then(result => Callback.onResult(%uid, JSON.stringify(result))).catch(err => Callback.onError(%uid, JSON.stringify(error)))"
): String? = coroutineScope {
): String = coroutineScope {
var result: String? = null
while (result == null) {

View File

@@ -46,5 +46,7 @@ suspend fun getSuggestionsForQuery(query: String) : List<Suggestion> {
suspend fun getGalleryIDsFromNozomi(area: String?, tag: String, language: String) : Set<Int> {
val jsArea = if (area == null) "null" else "'$area'"
return Json.decodeFromString(webView.evaluatePromise("""get_galleryids_from_nozomi($jsArea, '$tag', '$language')""") ?: return emptySet())
val json = webView.evaluatePromise("""get_galleryids_from_nozomi($jsArea, '$tag', '$language')""")
return Json.decodeFromString(json)
}

View File

@@ -801,7 +801,6 @@ class MainActivity :
throw Exception("No result")
}
} catch (e: Exception) {
if (e !is CancellationException)
FirebaseCrashlytics.getInstance().recordException(e)